USB Physical Port Mapping: Difference between revisions
Jump to navigation
Jump to search
(cosmetic changes) |
m (reformat) |
||
Line 1: | Line 1: | ||
The main reason to use physical USB port mapping is to be able to connect several usb devices which have the same IDs to different virtual machines (device-1 to VM1, device-2 to VM2, etc). | |||
== Map hardware USB port == | |||
qm monitor | === Find out physical port parameters (bus and port) === | ||
qm monitor <VM_ID> | |||
qm> info usbhost | qm> info usbhost | ||
'''Bus 3''', Addr 2, '''Port 1''', Speed 1.5 Mb/s | '''Bus 3''', Addr 2, '''Port 1''', Speed 1.5 Mb/s | ||
Line 11: | Line 12: | ||
Class 00: USB device 0624:0248, USB Composite Device-0 | Class 00: USB device 0624:0248, USB Composite Device-0 | ||
=== Add the device to the VM === | |||
Edit the VM's configuration file ''/etc/pve/qemu-server/<VM_ID>.conf'' and add this line: | |||
args: -device usb-host,hostbus='''3''',hostport='''1''' | args: -device usb-host,hostbus='''3''',hostport='''1''' | ||
Or this line (as Proxmox 2.x supports usbN in vm.conf): | |||
usb0: host='''3'''-'''1''' | usb0: host='''3'''-'''1''' | ||
=== Reboot the VM === | |||
Check that the USB device is seen by the VM: | |||
qm monitor | qm monitor <VM_ID> | ||
qm> info usb | qm> info usb | ||
Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet | Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet | ||
Line 27: | Line 32: | ||
'''Device 0.4, Port 2.1, Speed 1.5 Mb/s, Product HASP 2.17''' | '''Device 0.4, Port 2.1, Speed 1.5 Mb/s, Product HASP 2.17''' | ||
== References == | |||
*[[Manual: vm.conf|man vm.conf]] | |||
*http://www.kraxel.org/cgit/qemu/tree/docs/usb2.txt |
Revision as of 22:13, 27 April 2013
The main reason to use physical USB port mapping is to be able to connect several usb devices which have the same IDs to different virtual machines (device-1 to VM1, device-2 to VM2, etc).
Map hardware USB port
Find out physical port parameters (bus and port)
qm monitor <VM_ID> qm> info usbhost Bus 3, Addr 2, Port 1, Speed 1.5 Mb/s Vendor Specific: USB device 0529:0001, HASP 2.17 Bus 5, Addr 3, Port 2, Speed 12 Mb/s Class 00: USB device 0624:0248, USB Composite Device-0
Add the device to the VM
Edit the VM's configuration file /etc/pve/qemu-server/<VM_ID>.conf and add this line:
args: -device usb-host,hostbus=3,hostport=1
Or this line (as Proxmox 2.x supports usbN in vm.conf):
usb0: host=3-1
Reboot the VM
Check that the USB device is seen by the VM:
qm monitor <VM_ID> qm> info usb Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub Device 0.4, Port 2.1, Speed 1.5 Mb/s, Product HASP 2.17