qvm-device.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. Commands
  21. ========
  22. list
  23. ^^^^
  24. | :command:`qvm-device` *DEVICE_CLASS* list [-h] [--verbose] [--quiet] [*VMNAME* [*VMNAME* ...]]
  25. List devices.
  26. .. option:: --all
  27. List devices from all qubes. You can use :option:`--exclude` to limit the
  28. qubes set.
  29. .. option:: --exclude
  30. Exclude the qube from :option:`--all`.
  31. aliases: ls, l
  32. attach
  33. ^^^^^^
  34. | :command:`qvm-device` *DEVICE_CLASS* attach [-h] [--verbose] [--quiet] [--ro] *VMNAME* *BACKEND_DOMAIN:DEVICE_ID*
  35. Attach the device with *DEVICE_ID* from *BACKEND_DOMAIN* to the domain *VMNAME*
  36. .. option:: --option, -o
  37. Specify device-class specific option, use `name=value` format. You can
  38. specify this option multiple times. See below for options specific to
  39. different device classes.
  40. .. option:: --ro
  41. Alias for the `read-only=yes` option. If you specify both `--ro` and
  42. `--option read-only=no`, `--ro` takes precedence.
  43. .. option:: --persistent, -p
  44. Attach device persistently, which means have it attached also after qube restart.
  45. aliases: a, at
  46. detach
  47. ^^^^^^
  48. | :command:`qvm-device` *DEVICE_CLASS* detach [-h] [--verbose] [--quiet] *VMNAME* *BACKEND_DOMAIN:DEVICE_ID*
  49. Detach the device with *BACKEND_DOMAIN:DEVICE_ID* from domain *VMNAME*.
  50. If no device is given, detach all *DEVICE_CLASS* devices.
  51. aliases: d, dt
  52. Device classes
  53. ==============
  54. block
  55. ^^^^^
  56. Block device. Available options:
  57. * `frontend-dev` - device node in target domain, by default first available, starting from `xvdi`
  58. * `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
  59. * `devtype` - type of device - either `disk` or `cdrom`; default: `disk`
  60. usb
  61. ^^^
  62. USB device. This type of device does not support options.
  63. pci
  64. ^^^
  65. 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:
  66. * `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)
  67. * `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)
  68. mic
  69. ^^^
  70. Microphone, or other audio input. Normally there is only one device of this
  71. type - `dom0:mic`. Use PulseAudio settings in dom0 to select which input source
  72. is used.
  73. This type of device does not support options.
  74. Authors
  75. =======
  76. | Joanna Rutkowska <joanna at invisiblethingslab dot com>
  77. | Rafal Wojtczuk <rafal at invisiblethingslab dot com>
  78. | Marek Marczykowski <marmarek at invisiblethingslab dot com>