qemu-pr-helper.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ==================================
  2. QEMU persistent reservation helper
  3. ==================================
  4. Synopsis
  5. --------
  6. **qemu-pr-helper** [*OPTION*]
  7. Description
  8. -----------
  9. Implements the persistent reservation helper for QEMU.
  10. SCSI persistent reservations allow restricting access to block devices
  11. to specific initiators in a shared storage setup. When implementing
  12. clustering of virtual machines, it is a common requirement for virtual
  13. machines to send persistent reservation SCSI commands. However,
  14. the operating system restricts sending these commands to unprivileged
  15. programs because incorrect usage can disrupt regular operation of the
  16. storage fabric. QEMU's SCSI passthrough devices ``scsi-block``
  17. and ``scsi-generic`` support passing guest persistent reservation
  18. requests to a privileged external helper program. :program:`qemu-pr-helper`
  19. is that external helper; it creates a listener socket which will
  20. accept incoming connections for communication with QEMU.
  21. If you want to run VMs in a setup like this, this helper should be
  22. started as a system service, and you should read the QEMU manual
  23. section on "persistent reservation managers" to find out how to
  24. configure QEMU to connect to the socket created by
  25. :program:`qemu-pr-helper`.
  26. After connecting to the socket, :program:`qemu-pr-helper` can
  27. optionally drop root privileges, except for those capabilities that
  28. are needed for its operation.
  29. :program:`qemu-pr-helper` can also use the systemd socket activation
  30. protocol. In this case, the systemd socket unit should specify a
  31. Unix stream socket, like this::
  32. [Socket]
  33. ListenStream=/var/run/qemu-pr-helper.sock
  34. Options
  35. -------
  36. .. program:: qemu-pr-helper
  37. .. option:: -d, --daemon
  38. run in the background (and create a PID file)
  39. .. option:: -q, --quiet
  40. decrease verbosity
  41. .. option:: -v, --verbose
  42. increase verbosity
  43. .. option:: -f, --pidfile=PATH
  44. PID file when running as a daemon. By default the PID file
  45. is created in the system runtime state directory, for example
  46. :file:`/var/run/qemu-pr-helper.pid`.
  47. .. option:: -k, --socket=PATH
  48. path to the socket. By default the socket is created in
  49. the system runtime state directory, for example
  50. :file:`/var/run/qemu-pr-helper.sock`.
  51. .. option:: -T, --trace [[enable=]PATTERN][,events=FILE][,file=FILE]
  52. .. include:: ../qemu-option-trace.rst.inc
  53. .. option:: -u, --user=USER
  54. user to drop privileges to
  55. .. option:: -g, --group=GROUP
  56. group to drop privileges to
  57. .. option:: -h, --help
  58. Display a help message and exit.
  59. .. option:: -V, --version
  60. Display version information and exit.