core-admin/doc
2016-10-14 15:29:37 +02:00
..
_static doc: Fix docutils table column width 2015-06-29 17:39:25 +02:00
_templates doc: Fix docutils table column width 2015-06-29 17:39:25 +02:00
manpages Merge remote-tracking branch 'marmarek/core3-backup' into core3-devel 2016-10-14 15:29:37 +02:00
qubes-tools Fix documentation 2016-04-20 13:50:42 +02:00
qubes-vm Fix documentation 2016-04-20 13:50:42 +02:00
.gitignore doc: Add autogenerated qubes.xml documentation 2015-06-29 17:39:25 +02:00
conf.py Add qvm-block 2016-06-23 13:16:08 +02:00
example.xml qubes: new devices API 2016-09-03 20:40:39 +02:00
index.rst Add possibility to override libvirt config 2016-10-04 11:31:31 +02:00
libvirt.rst Add possibility to override libvirt config 2016-10-04 11:31:31 +02:00
Makefile doc: Add autogenerated qubes.xml documentation 2015-06-29 17:39:25 +02:00
qubes-dochelpers.rst doc: add hyphens to module page titles 2015-06-29 17:39:23 +02:00
qubes-events.rst qubes/events: Rework firing events for effect 2016-04-08 12:35:11 +02:00
qubes-exc.rst core3: Add documentation to qubes.exc 2015-10-17 00:20:44 +02:00
qubes-ext.rst qubes: documentation and licence fixes 2015-06-29 17:39:27 +02:00
qubes-log.rst doc: add hyphens to module page titles 2015-06-29 17:39:23 +02:00
qubes-tests.rst qubes/doc: Test's documentation improvement 2015-06-29 17:39:24 +02:00
qubes.rst qubes: more documentation and doc fixes 2015-06-29 17:39:28 +02:00
README.pvusb rename netvm -> sys-net, firewallvm -> sys-firewall 2015-03-31 20:42:53 +02:00
requirements.txt Add requirements.txt for readthedocs.org 2016-04-22 15:51:50 +02:00
skel-manpage.py qubes: Documentation for qubes.tools 2015-06-29 17:39:28 +02:00

Dedicated usbvm (optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~

In dom0, once:
 qvm-create -l red usbvm

 # FIXME: use your own PCI device IDs
 qvm-pci -a usbvm 00:1d.0
 qvm-pci -a usbvm 00:1d.1
 qvm-pci -a usbvm 00:1d.2
 qvm-pci -a usbvm 00:1d.7

After each dom0 reboot:
 qvm-start usbvm

List
~~~~

In dom0:
 qvm-usb -l

Example output:
 dom0:7-4        0718:061a TDKMedia_Trans-It_Drive_070326AE8AF92D95 (attached to qdvp:0-1)
 dom0:7-5        0b05:1706 ASUS_802.11g_WLAN_Drive (attached to sys-net:0-1)
 dom0:1-1        045e:0084 Microsoft_Basic_Optical_Mouse
 usbvm:4-6       05e3:0723 Generic_USB_Storage (attached to qdvp:1-1)

Attach
~~~~~~

In dom0:
 qvm-usb -a [--no-auto-detach] <vm-name> <device-vm-name>:<backend-controller>-<backend-port>

Example:
 qvm-usb -a sys-net usbvm:4-1

Detach
~~~~~~

In dom0:
 qvm-usb -d <vm-name>:<vusb-controller>-<vusb-port>

Example:
 qvm-usb -d sys-net:0-1

Known issues
~~~~~~~~~~~~

List/attach/detach operations seem to work ok, devices are recognized by the target VM etc.
But actual usage of the attached devices is unstable at best. In fact the only working device
I saw was one USB stick (and this only after it took a minute to time out and reset the bus
couple times). Kernel crashes are normal as well. I have not investigated these issues yet,
I had similar experience with Marek's scripts.

* System keyboard / mouse are listed and can be detached away
* Virtual USB devices (ones created by PVUSB frontend) may be listed
* The installation/configuration is not persistent, not retained between reboots
* No debugging / logging / audit trail
* When an attached device is physically unplugged, USB port remains mapped but not displayed
in the list. If device is plugged back it continues to work. Unlisted device cannot be detached.
* We are not attaching actual devices, but USB ports (different behavior from VMWare, might be confusing)
* After device is detached from the frontend and returned back to the backend it is not alwayws usable there
* Code changing configuration of pvusb fe/be and vusb bind/unbind helper are located
misc/xl-qvm-usb-attach.py misc/xl-qvm-usb-detach.py misc/vusb-ctl.py. These helpers are
deployed into the backend domain. The initialization code is qubesutils.py in usb_setup(),
should probably also be moved into an external helper. Perhaps the functionality of these
external helpers should be merged into libxl? The is one catch is invokation of vusb helper
in the backend domain -- now it relies on qubes-specific API.
* After reboot attached USB devices are not listed by 'qvm-usb -l' until replugged.