Go to file
Marek Marczykowski 52dbedaac2 dom0/backup-restore: chown dom0 home after restore
It can happen that backup was done as different user (in terms of UID) than on
restore system. Correct this by chown.

Especially this is the case when backup was done on Qubes R1 and restore on
Qubes R2.
2013-02-27 05:34:53 +01:00
dom0 dom0/backup-restore: chown dom0 home after restore 2013-02-27 05:34:53 +01:00
misc vm: Use nautilus-actions to provide "Copy to other AppVM" etc nautilus commands 2013-02-21 16:44:16 +01:00
network vm/network: create NetworkManager config link only once 2013-01-11 05:05:39 +01:00
qrexec qrexec_policy: Improve user message readability 2013-02-25 11:13:19 +01:00
qubes_rpc vm/file-editor: send logs to dom0 (qrexec.*.log) 2013-02-25 06:48:56 +01:00
rpm_spec dom0: create volatile.img if not exists (StandaloneVM case) 2013-02-27 05:29:27 +01:00
test dvp/qvm-usb: ignore whitespaces when comparing output of qvm-usb tools 2012-10-21 14:59:36 +02:00
u2mfn dom0/u2mfn: fix compile warning 2012-11-14 13:31:47 +01:00
vchan vchan/vm: implement libvchan_cleanup to release resources used by vchan link 2012-12-12 02:39:34 +01:00
vm-init.d vm: Use nautilus-actions to provide "Copy to other AppVM" etc nautilus commands 2013-02-21 16:44:16 +01:00
vm-systemd vm: Use nautilus-actions to provide "Copy to other AppVM" etc nautilus commands 2013-02-21 16:44:16 +01:00
.gitignore gitignore files - add build products 2011-03-06 14:06:24 +01:00
build-deps.list dom0: Scale icons to 48x48 2013-02-19 01:05:22 +01:00
LICENSE Added LICENSE 2010-04-05 21:21:27 +02:00
Makefile makefile: support dom0 different than fc13 2013-01-25 03:07:16 +01:00
README.pvusb dom0+vm/usb: added another bug to readme 2012-11-08 10:44:20 +01:00
version_dom0 version 2.1.12 2013-02-24 10:10:41 +01:00
version_libs libs version 2.1.1 2012-12-12 04:14:46 +01:00
version_vaio_fixes sony-vaio-fixes v1.6.1 2011-07-25 01:49:07 +02:00
version_vm version 2.1.12 2013-02-24 10:10:41 +01: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 netvm: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 netvm usbvm:4-1

Detach
~~~~~~

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

Example:
 qvm-usb -d netvm: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.