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-pr-helper.md
View on GitHub# qemu-pr-helper — SCSI Persistent Reservation Helper
SCSI persistent reservations restrict access to block devices to specific initiators in shared storage setups. This helper daemon handles PR commands from QEMU's SCSI passthrough devices (`scsi-block`, `scsi-generic`).
## Synopsis
```
qemu-pr-helper [OPTION]
```
## How It Works
1. QEMU's `scsi-block` or `scsi-generic` device receives a PR command from the guest
2. Instead of executing it directly (which requires privileges), QEMU forwards it to `qemu-pr-helper` over a UNIX socket
3. `qemu-pr-helper` executes the PR command on behalf of QEMU
4. Returns the result to QEMU, which passes it to the guest
This allows unprivileged QEMU processes to use SCSI persistent reservations while the helper runs with elevated privileges.
## Options
| Option | Description |
|--------|-------------|
| `-d, --daemon` | Run in background (creates PID file) |
| `-q, --quiet` | Decrease verbosity |
| `-v, --verbose` | Increase verbosity |
| `-f, --pidfile PATH` | PID file (default: `/var/run/qemu-pr-helper.pid`) |
| `-k, --socket PATH` | Socket path (default: `/var/run/qemu-pr-helper.sock`) |
| `-u, --user USER` | Drop privileges to this user |
| `-g, --group GROUP` | Drop privileges to this group |
| `-T, --trace [...]` | Tracing options |
| `-h, --help` | Display help |
| `-V, --version` | Display version |
## systemd Integration
Supports socket activation. Example socket unit:
```
[Socket]
ListenStream=/var/run/qemu-pr-helper.sock
```
## QEMU Configuration
In the QEMU command line, configure the PR manager on the block device:
```
-object pr-manager-helper,id=pr0,path=/var/run/qemu-pr-helper.sock \
-drive file=shared.qcow2,if=none,id=drive0,format=qcow2 \
-device scsi-block,drive=drive0,pr-manager=pr0
```
## Use Case
Shared SCSI storage in a cluster of virtual machines. Each VM needs to coordinate access to the same LUN. Persistent reservations provide the cluster fence mechanism — when a node fails, the cluster manager releases its PR and another node takes ownership.
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: 323k | 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: 323k | 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: 323k | Updated | Claude CodeCodex | Verified | Install |