carapace-sh/carapace-bin / skills/qemu
qemu
UnverifiedUse when working with QEMU — qemu-system-*, qemu-img, qemu-nbd, qemu-storage-daemon, qemu-pr-helper, block drivers, machine types, CPU models, device emulation, networking, display options, QMP protocol, and guest agent. Triggers on: "qemu", "qemu-system", "qemu-img", "qemu-nbd", "qemu-kvm", "QEMU", "qcow2", "qcow", "qed", "virtio", "virgl", "vhost-user", "VirtIO", "block driver", "machine type", "SEV", "SEV-SNP", "TDX", "snapshot", "backing file", "NBD", "Network Block Device", "QMP", "QEMU Monitor Protocol", "guest agent", "qemu-ga", "cpu model", "host passthrough", "SPICE", "VNC".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.5 KB |
| references/block-devices.md | markdown | 4.1 KB |
| references/block-drivers.md | markdown | 4.6 KB |
| references/cpu-models.md | markdown | 4.8 KB |
| references/devices.md | markdown | 5.1 KB |
| references/display.md | markdown | 4.2 KB |
| references/guest-agent.md | markdown | 4.0 KB |
| references/machine.md | markdown | 3.2 KB |
| references/man-docs.md | markdown | 2.9 KB |
| references/networking.md | markdown | 5.2 KB |
| references/overview.md | markdown | 3.8 KB |
| references/qemu-img.md | markdown | 6.5 KB |
| references/qemu-nbd.md | markdown | 3.3 KB |
| references/qemu-pr-helper.md | markdown | 2.0 KB |
| references/qemu-storage-daemon.md | markdown | 3.7 KB |
| references/qemu-system.md | markdown | 5.2 KB |
| references/qmp.md | markdown | 5.8 KB |
references/qemu-storage-daemon.md
View on GitHub# qemu-storage-daemon — Standalone Block Storage Daemon
Long-lived process that provides disk image functionality without running a VM. Controlled via QMP commands.
## Synopsis
```
qemu-storage-daemon [options]
```
## Overview
The daemon provides a subset of QEMU block features:
- Block nodes (`--blockdev`)
- Block jobs (commit, mirror, backup)
- Block exports (NBD, vhost-user-blk, FUSE, vduse-blk)
- Throttle groups
- Character devices (`--chardev`)
- Crypto and secrets (`--object`)
- QMP monitor
- IOThreads
Controlled via `--monitor ... mode=control` (there is no `--qmp` flag). Shutdown with `quit` QMP command or SIGINT/SIGHUP/SIGTERM.
## Command-Line Options
| Option | Description |
|--------|-------------|
| `-h, --help` | Display help |
| `-V, --version` | Display version |
| `-T, --trace [...]` | Tracing options |
| `--blockdev BLOCKDEVDEF` | Block node definition (same syntax as qemu-system `-blockdev`) |
| `--chardev CHARDEVDEF` | Character device definition |
| `--export EXPORTDEF` | Block export definition (NBD, vhost-user-blk, FUSE, vduse-blk) |
| `--monitor MONITORDEF` | QMP monitor configuration (use `mode=control`; e.g. `chardev=char0,mode=control`) |
| `--nbd-server addr.type=unix,addr.path=PATH` or `addr.type=inet,...` | Configure NBD server for dynamic exports |
| `--object OBJECTDEF` | QEMU user-creatable object (secrets, crypto, throttlegroups, iothreads) |
| `--pidfile PATH` | Write PID to file |
| `--daemonize` | Fork to background |
## Export Types
### NBD Export
```
--export [type=]nbd,id=ID,node-name=NODE[,name=EXPORT_NAME][,writable=on|off][,bitmap=BITMAP]
```
Requires `--nbd-server` to be set first.
### vhost-user-blk Export
```
--export [type=]vhost-user-blk,id=ID,node-name=NODE,addr.type=unix,addr.path=SOCKET[,writable=on|off][,logical-block-size=BYTES][,num-queues=N]
```
Accepts connections over a vhost-user UNIX socket.
### FUSE Export
```
--export [type=]fuse,id=ID,node-name=NODE,mountpoint=FILE[,growable=on|off][,writable=on|off][,allow-other=on|off|auto]
```
Exports a block node as a regular file via FUSE.
### vduse-blk Export
```
--export [type=]vduse-blk,id=ID,node-name=NODE,name=VDUSE_NAME[,writable=on|off][,num-queues=N][,queue-size=QS][,logical-block-size=BYTES][,serial=SERIAL]
```
Creates a VDUSE device; must be added to vDPA bus with `vdpa(8)`.
## Examples
Simple NBD export:
```
qemu-storage-daemon \
--blockdev file,node-name=file,filename=vmdisk.qcow2 \
--blockdev qcow2,node-name=disk,file=file \
--nbd-server addr.type=unix,addr.path=/tmp/nbd.sock \
--export nbd,id=export0,node-name=disk,writable=on \
--monitor chardev=mon0,mode=control,pretty=on
```
(Note: there is no `--qmp` flag; use `--monitor ... mode=control`)`
FUSE export (mount disk image as a file):
```
qemu-storage-daemon \
--blockdev file,node-name=file,filename=vmdisk.qcow2 \
--blockdev qcow2,node-name=disk,file=file \
--export fuse,id=export0,node-name=disk,mountpoint=/mnt/disk.raw,writable=on
```
With IOThread:
```
qemu-storage-daemon \
--object iothread,id=iothread0 \
--blockdev file,node-name=file,filename=vmdisk.qcow2,aio=io_uring,iothread=iothread0 \
--blockdev qcow2,node-name=disk,file=file \
--export nbd,id=export0,node-name=disk \
--nbd-server addr.type=unix,addr.path=/tmp/nbd.sock
```
## QMP Commands
The daemon supports these QMP command categories:
- `block-*` — block job management (commit, mirror, backup, create, resize)
- `blockdev-*` — dynamic block graph changes (add/remove nodes, create/destroy)
- `query-*` — information queries
- `nbd-server-*` — dynamic NBD server/add/remove exports
- `qmp_capabilities` — QMP handshake
- `quit` — shutdown
See `qemu-storage-daemon-qmp-ref(7)` for the full list.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |