Document device attach options in man page

Fixes QubesOS/qubes-issues#3204
This commit is contained in:
Marek Marczykowski-Górecki 2017-10-24 03:22:46 +02:00
parent ef17e86810
commit 2fac77da6f
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 24 additions and 5 deletions

View File

@ -56,7 +56,8 @@ Attach the device with *DEVICE_ID* from *BACKEND_DOMAIN* to the domain *VMNAME*
.. option:: --option, -o
Specify device-class specific option, use `name=value` format. You can
specify this option multiple times.
specify this option multiple times. See below for options specific to
different device classes.
.. option:: --persistent, -p
@ -77,9 +78,27 @@ aliases: d, dt
Device classes
==============
* block - block devices
* usb - USB devices
* pci - PCI devices
block
^^^^^
Block device. Available options:
* `frontend-dev` - device node in target domain, by default first available, starting from `xvdi`
* `read-only` - attach device in read-only mode; default depends on device, if possible - attach read-write; if device itself is read-only, only read-only attach is allowed
* `devtype` - type of device - either `disk` or `cdrom`; default: `disk`
usb
^^^
USB device. This type of device does not support options.
pci
^^^
PCI device. Only dom0 expose such devices. One should be very careful when attaching this type of devices, because some of them are strictly required to stay in dom0 (for example host bridge). Available options:
* `no-strict-reset` - allow to attach device even if it does not support any reliable reset operation; switching such device to another domain (without full host restart) can be a security risk; default: `False`, accepted values: `True`, `False` (option absent)
Authors
=======

View File

@ -235,7 +235,7 @@ def get_parser(device_class=None):
attach_parser.add_argument('--option', '-o', action='append',
help="Set option for the device in opt=value form (can be specified "
"multiple times)")
"multiple times), see man qvm-device for details")
attach_parser.add_argument('--persistent', '-p', action='store_true',
default=False,
help="Attach device persistently (so it will be automatically "