qvm-device.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. .. program:: qvm-device
  2. =============================================
  3. :program:`qvm-device` -- List/set VM devices
  4. =============================================
  5. Synopsis
  6. ========
  7. | :command:`qvm-device` *DEVICE_CLASS* {list,ls,l} [*options*] <*vm-name*>
  8. | :command:`qvm-device` *DEVICE_CLASS* {attach,at,a} [*options*] <*vm-name*> <*device*>
  9. | :command:`qvm-device` *DEVICE_CLASS* {detach,dt,d} [*options*] <*vm-name*> [<*device*>]
  10. | :command:`qvm-*DEVICE_CLASS*` {list,ls,l,attach,at,a,detach,dt,d} [*options*] <*vmname*> ...
  11. .. note:: :command:`qvm-block`, :command:`qvm-usb` and :command:`qvm-pci` are just aliases for :command:`qvm-device block`, :command:`qvm-device usb` and :command:`qvm-device pci` respectively.
  12. Options
  13. =======
  14. .. option:: --help, -h
  15. Show this help message and exit
  16. .. option:: --verbose, -v
  17. increase verbosity
  18. .. option:: --quiet, -q
  19. decrease verbosity
  20. .. option:: --list-device-classes
  21. list device classes
  22. Commands
  23. ========
  24. list
  25. ^^^^
  26. | :command:`qvm-device` *DEVICE_CLASS* list [-h] [--verbose] [--quiet] [*VMNAME* [*VMNAME* ...]]
  27. List devices.
  28. .. option:: --all
  29. List devices from all qubes. You can use :option:`--exclude` to limit the
  30. qubes set.
  31. .. option:: --exclude
  32. Exclude the qube from :option:`--all`.
  33. aliases: ls, l
  34. attach
  35. ^^^^^^
  36. | :command:`qvm-device` *DEVICE_CLASS* attach [-h] [--verbose] [--quiet] [--ro] *VMNAME* *BACKEND_DOMAIN:DEVICE_ID*
  37. Attach the device with *DEVICE_ID* from *BACKEND_DOMAIN* to the domain *VMNAME*
  38. .. option:: --option, -o
  39. Specify device-class specific option, use `name=value` format. You can
  40. specify this option multiple times. See below for options specific to
  41. different device classes.
  42. .. option:: --ro
  43. Alias for the `read-only=yes` option. If you specify both `--ro` and
  44. `--option read-only=no`, `--ro` takes precedence.
  45. .. option:: --persistent, -p
  46. Attach device persistently, which means have it attached also after qube restart.
  47. aliases: a, at
  48. detach
  49. ^^^^^^
  50. | :command:`qvm-device` *DEVICE_CLASS* detach [-h] [--verbose] [--quiet] *VMNAME* *BACKEND_DOMAIN:DEVICE_ID*
  51. Detach the device with *BACKEND_DOMAIN:DEVICE_ID* from domain *VMNAME*.
  52. If no device is given, detach all *DEVICE_CLASS* devices.
  53. aliases: d, dt
  54. Device classes
  55. ==============
  56. block
  57. ^^^^^
  58. Block device. Available options:
  59. * `frontend-dev` - device node in target domain, by default first available, starting from `xvdi`
  60. * `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
  61. * `devtype` - type of device - either `disk` or `cdrom`; default: `disk`
  62. usb
  63. ^^^
  64. USB device. This type of device does not support options.
  65. pci
  66. ^^^
  67. 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:
  68. * `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)
  69. * `permissive` - allow write access to most of PCI config space, instead of only selected whitelisted rregisters; a workaround for some PCI passthrough problems, potentially unsafe; default: `False`, accepted values: `True`, `False` (option absent)
  70. mic
  71. ^^^
  72. Microphone, or other audio input. Normally there is only one device of this
  73. type - `dom0:mic`. Use PulseAudio settings in dom0 to select which input source
  74. is used.
  75. This type of device does not support options.
  76. Authors
  77. =======
  78. | Joanna Rutkowska <joanna at invisiblethingslab dot com>
  79. | Rafal Wojtczuk <rafal at invisiblethingslab dot com>
  80. | Marek Marczykowski <marmarek at invisiblethingslab dot com>
  81. | Frédéric Pierret <frederic.pierret at qubes dash os dot org>