README.pvusb 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Dedicated usbvm (optional)
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. In dom0, once:
  4. qvm-create -l red usbvm
  5. # FIXME: use your own PCI device IDs
  6. qvm-pci -a usbvm 00:1d.0
  7. qvm-pci -a usbvm 00:1d.1
  8. qvm-pci -a usbvm 00:1d.2
  9. qvm-pci -a usbvm 00:1d.7
  10. After each dom0 reboot:
  11. qvm-start usbvm
  12. List
  13. ~~~~
  14. In dom0:
  15. qvm-usb -l
  16. Example output:
  17. dom0:7-4 0718:061a TDKMedia_Trans-It_Drive_070326AE8AF92D95 (attached to qdvp:0-1)
  18. dom0:7-5 0b05:1706 ASUS_802.11g_WLAN_Drive (attached to netvm:0-1)
  19. dom0:1-1 045e:0084 Microsoft_Basic_Optical_Mouse
  20. usbvm:4-6 05e3:0723 Generic_USB_Storage (attached to qdvp:1-1)
  21. Attach
  22. ~~~~~~
  23. In dom0:
  24. qvm-usb -a [--no-auto-detach] <vm-name> <device-vm-name>:<backend-controller>-<backend-port>
  25. Example:
  26. qvm-usb -a netvm usbvm:4-1
  27. Detach
  28. ~~~~~~
  29. In dom0:
  30. qvm-usb -d <vm-name>:<vusb-controller>-<vusb-port>
  31. Example:
  32. qvm-usb -d netvm:0-1
  33. Known issues
  34. ~~~~~~~~~~~~
  35. List/attach/detach operations seem to work ok, devices are recognized by the target VM etc.
  36. But actual usage of the attached devices is unstable at best. In fact the only working device
  37. I saw was one USB stick (and this only after it took a minute to time out and reset the bus
  38. couple times). Kernel crashes are normal as well. I have not investigated these issues yet,
  39. I had similar experience with Marek's scripts.
  40. * System keyboard / mouse are listed and can be detached away
  41. * Virtual USB devices (ones created by PVUSB frontend) may be listed
  42. * The installation/configuration is not persistent, not retained between reboots
  43. * No debugging / logging / audit trail
  44. * When an attached device is physically unplugged, USB port remains mapped but not displayed
  45. in the list. If device is plugged back it continues to work. Unlisted device cannot be detached.
  46. * We are not attaching actual devices, but USB ports (different behavior from VMWare, might be confusing)
  47. * After device is detached from the frontend and returned back to the backend it is not alwayws usable there
  48. * Code changing configuration of pvusb fe/be and vusb bind/unbind helper are located
  49. misc/xl-qvm-usb-attach.py misc/xl-qvm-usb-detach.py misc/vusb-ctl.py. These helpers are
  50. deployed into the backend domain. The initialization code is qubesutils.py in usb_setup(),
  51. should probably also be moved into an external helper. Perhaps the functionality of these
  52. external helpers should be merged into libxl? The is one catch is invokation of vusb helper
  53. in the backend domain -- now it relies on qubes-specific API.
  54. * After reboot attached USB devices are not listed by 'qvm-usb -l' until replugged.