qemu-e2k/docs
Paolo Bonzini 7c9e527659 scsi, file-posix: add support for persistent reservation management
It is a common requirement for virtual machine to send persistent
reservations, but this currently requires either running QEMU with
CAP_SYS_RAWIO, or using out-of-tree patches that let an unprivileged
QEMU bypass Linux's filter on SG_IO commands.

As an alternative mechanism, the next patches will introduce a
privileged helper to run persistent reservation commands without
expanding QEMU's attack surface unnecessarily.

The helper is invoked through a "pr-manager" QOM object, to which
file-posix.c passes SG_IO requests for PERSISTENT RESERVE OUT and
PERSISTENT RESERVE IN commands.  For example:

  $ qemu-system-x86_64
      -device virtio-scsi \
      -object pr-manager-helper,id=helper0,path=/var/run/qemu-pr-helper.sock
      -drive if=none,id=hd,driver=raw,file.filename=/dev/sdb,file.pr-manager=helper0
      -device scsi-block,drive=hd

or:

  $ qemu-system-x86_64
      -device virtio-scsi \
      -object pr-manager-helper,id=helper0,path=/var/run/qemu-pr-helper.sock
      -blockdev node-name=hd,driver=raw,file.driver=host_device,file.filename=/dev/sdb,file.pr-manager=helper0
      -device scsi-block,drive=hd

Multiple pr-manager implementations are conceivable and possible, though
only one is implemented right now.  For example, a pr-manager could:

- talk directly to the multipath daemon from a privileged QEMU
  (i.e. QEMU links to libmpathpersist); this makes reservation work
  properly with multipath, but still requires CAP_SYS_RAWIO

- use the Linux IOC_PR_* ioctls (they require CAP_SYS_ADMIN though)

- more interestingly, implement reservations directly in QEMU
  through file system locks or a shared database (e.g. sqlite)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-09-22 01:06:51 +02:00
..
config docs: create config/, devel/ and spin/ subdirectories 2017-06-07 18:22:03 +02:00
devel memory: avoid "resurrection" of dead FlatViews 2017-09-21 23:19:37 +02:00
interop vhost-user: fix legacy cross-endian configurations 2017-08-02 00:13:25 +03:00
specs docs: fix broken paths to docs/specs/ivshmem-spec.txt 2017-07-31 13:13:01 +03:00
spin docs: create config/, devel/ and spin/ subdirectories 2017-06-07 18:22:03 +02:00
block-replication.txt
bootindex.txt docs qemu-doc: Avoid ide-drive, it's deprecated 2017-06-04 18:42:55 +03:00
ccid.txt
COLO-FT.txt
colo-proxy.txt colo-compare: Update the COLO document to add the IOThread configuration 2017-09-08 09:34:40 +08:00
generic-loader.txt
igd-assign.txt
image-fuzzer.txt
memory-hotplug.txt
multi-thread-compression.txt
multiseat.txt
nvdimm.txt
pci_expander_bridge.txt
pcie_pci_bridge.txt docs: update documentation considering PCIE-PCI bridge 2017-09-08 16:15:17 +03:00
pcie.txt docs: update documentation considering PCIE-PCI bridge 2017-09-08 16:15:17 +03:00
pr-manager.rst scsi, file-posix: add support for persistent reservation management 2017-09-22 01:06:51 +02:00
qcow2-cache.txt docs: fix broken paths to docs/interop/qcow2.txt 2017-07-31 13:12:35 +03:00
qdev-device-use.txt docs/qdev-device-use.txt: update section Default Devices 2017-06-04 18:42:55 +03:00
qemu_logo.pdf
qemupciserial.inf
rdma.txt
replay.txt replay: add record/replay for audio passthrough 2017-03-01 15:11:44 +01:00
spice-port-fqdn.txt
throttle.txt
usb2.txt docs: fix broken paths to docs/config/ich9-ehci-uhci.cfg 2017-07-31 13:12:55 +03:00
usb-storage.txt
virtio-balloon-stats.txt
xbzrle.txt
xen-save-devices-state.txt