1 QEMU persistent reservation helper
2 ==================================
7 **qemu-pr-helper** [*OPTION*]
12 Implements the persistent reservation helper for QEMU.
14 SCSI persistent reservations allow restricting access to block devices
15 to specific initiators in a shared storage setup. When implementing
16 clustering of virtual machines, it is a common requirement for virtual
17 machines to send persistent reservation SCSI commands. However,
18 the operating system restricts sending these commands to unprivileged
19 programs because incorrect usage can disrupt regular operation of the
20 storage fabric. QEMU's SCSI passthrough devices ``scsi-block``
21 and ``scsi-generic`` support passing guest persistent reservation
22 requests to a privileged external helper program. :program:`qemu-pr-helper`
23 is that external helper; it creates a socket which QEMU can
24 connect to to communicate with it.
26 If you want to run VMs in a setup like this, this helper should be
27 started as a system service, and you should read the QEMU manual
28 section on "persistent reservation managers" to find out how to
29 configure QEMU to connect to the socket created by
30 :program:`qemu-pr-helper`.
32 After connecting to the socket, :program:`qemu-pr-helper` can
33 optionally drop root privileges, except for those capabilities that
34 are needed for its operation.
36 :program:`qemu-pr-helper` can also use the systemd socket activation
37 protocol. In this case, the systemd socket unit should specify a
38 Unix stream socket, like this::
41 ListenStream=/var/run/qemu-pr-helper.sock
46 .. program:: qemu-pr-helper
48 .. option:: -d, --daemon
50 run in the background (and create a PID file)
52 .. option:: -q, --quiet
56 .. option:: -v, --verbose
60 .. option:: -f, --pidfile=PATH
62 PID file when running as a daemon. By default the PID file
63 is created in the system runtime state directory, for example
64 :file:`/var/run/qemu-pr-helper.pid`.
66 .. option:: -k, --socket=PATH
68 path to the socket. By default the socket is created in
69 the system runtime state directory, for example
70 :file:`/var/run/qemu-pr-helper.sock`.
72 .. option:: -T, --trace [[enable=]PATTERN][,events=FILE][,file=FILE]
74 .. include:: ../qemu-option-trace.rst.inc
76 .. option:: -u, --user=USER
78 user to drop privileges to
80 .. option:: -g, --group=GROUP
82 group to drop privileges to
84 .. option:: -h, --help
86 Display a help message and exit.
88 .. option:: -V, --version
90 Display version information and exit.