Wojtek Porczyk ff28ced03f Add requirements.txt for readthedocs.org 8 năm trước cách đây
..
_static 6df316378b doc: Fix docutils table column width 9 năm trước cách đây
_templates 6df316378b doc: Fix docutils table column width 9 năm trước cách đây
manpages e720e1634b qubes/tools: rewrite qvm-shutdown 8 năm trước cách đây
qubes-tools 94589915b0 Fix documentation 8 năm trước cách đây
qubes-vm 94589915b0 Fix documentation 8 năm trước cách đây
.gitignore 42d8e67556 doc: Add autogenerated qubes.xml documentation 9 năm trước cách đây
Makefile 42d8e67556 doc: Add autogenerated qubes.xml documentation 9 năm trước cách đây
README.pvusb 20b3fdedb8 rename netvm -> sys-net, firewallvm -> sys-firewall 9 năm trước cách đây
conf.py ff28ced03f Add requirements.txt for readthedocs.org 8 năm trước cách đây
example.xml 93686eae06 qubes/vm: change services to features 8 năm trước cách đây
index.rst 62da967f78 Fix generating documentation 8 năm trước cách đây
qubes-dochelpers.rst 56092073e9 doc: add hyphens to module page titles 9 năm trước cách đây
qubes-events.rst c5962910d0 qubes/events: Rework firing events for effect 8 năm trước cách đây
qubes-exc.rst 2e42a408e5 core3: Add documentation to qubes.exc 8 năm trước cách đây
qubes-ext.rst ee06e7d7a2 qubes: documentation and licence fixes 9 năm trước cách đây
qubes-log.rst 56092073e9 doc: add hyphens to module page titles 9 năm trước cách đây
qubes-tests.rst b442fb0fab qubes/doc: Test's documentation improvement 9 năm trước cách đây
qubes.rst e83d21c671 qubes: more documentation and doc fixes 9 năm trước cách đây
requirements.txt ff28ced03f Add requirements.txt for readthedocs.org 8 năm trước cách đây
skel-manpage.py 142521317c qubes: Documentation for qubes.tools 9 năm trước cách đây

README.pvusb

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] :-

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

Detach
~~~~~~

In dom0:
qvm-usb -d :-

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.