Difference between revisions of "USB physical port mapping"

From Proxmox VE
Jump to navigation Jump to search
(revert changes as the the page became confused)
Line 1: Line 1:
== PVE version 2.x  ==
+
Currently (Stable version of Proxmox is 1.9) it's possible to map hardware usb port in a following way:
 
 
To map hardware usb port use the following instructions:
 
 
 
1. Find out physical port parameters (bus and port). On host run:
 
 
 
'''lsusb -t'''
 
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 
/: Bus 0'''3'''.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 
|__ Port '''1''': Dev 4, If 0, Class=vend., Driver=usbfs, 1.5M
 
|__ Port 2: Dev 5, If 0, Class=vend., Driver=usbfs, 1.5M
 
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/8p, 480M
 
 
 
2. Edit the VM config file and add the following entry:<br>
 
 
 
'''usb0: host=3-1'''
 
 
 
Which corresponds to Bus number 3 and Port number 1 or you can use combination ''vendor_id:product_id ''(use ''lsusb'' command to get values)<br>
 
 
 
'''usb0: host=067b:2303'''
 
 
 
3. Power off/power on VM.
 
 
 
<br>
 
 
 
----
 
 
 
== PVE version 1.9  ==
 
 
 
To map hardware usb port use the following instructions:  
 
 
 
1. Find out physical port parameters (bus and port)
 
  
 +
1. Find out physical port parameters (bus and port)
 
   qm monitor NNN
 
   qm monitor NNN
qm&gt; 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
Vendor Specific: USB device 0529:0001, HASP 2.17
+
      Vendor Specific: USB device 0529:0001, HASP 2.17
Bus 5, Addr 3, Port 2, Speed 12 Mb/s
+
    Bus 5, Addr 3, Port 2, Speed 12 Mb/s
Class 00: USB device 0624:0248, USB Composite Device-0
+
      Class 00: USB device 0624:0248, USB Composite Device-0
 
 
2. Add the device to the particular VM (/etc/qemu-server/NNN.conf)
 
  
 +
2. Add the device to the particular VM (/etc/qemu-server/NNN.conf)
 
   args: -device usb-host,hostbus='''3''',hostport='''1'''
 
   args: -device usb-host,hostbus='''3''',hostport='''1'''
 
+
or (as Proxmox 2.x supports usbN in vm.conf)
or (as Proxmox 2.x supports usbN in vm.conf)  
 
 
 
 
   usb0: host='''3'''-'''1'''
 
   usb0: host='''3'''-'''1'''
  
3. Power off/power on VM and check  
+
3. Power off/power on VM and check
 
 
 
   qm monitor NNN
 
   qm monitor NNN
qm&gt; 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
Device 0.3, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
+
    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'''
+
    '''Device 0.4, Port 2.1, Speed 1.5 Mb/s, Product HASP 2.17'''
 
 
More information:
 
  
#[[Manual: vm.conf|man vm.conf]]  
+
More information:
#http://www.kraxel.org/cgit/qemu/tree/docs/usb2.txt
+
# [[Manual:_vm.conf|man vm.conf]]
 +
# http://www.kraxel.org/cgit/qemu/tree/docs/usb2.txt

Revision as of 20:42, 21 December 2012

Currently (Stable version of Proxmox is 1.9) it's possible to map hardware usb port in a following way:

1. Find out physical port parameters (bus and port)

 qm monitor NNN
 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

2. Add the device to the particular VM (/etc/qemu-server/NNN.conf)

 args: -device usb-host,hostbus=3,hostport=1

or (as Proxmox 2.x supports usbN in vm.conf)

 usb0: host=3-1

3. Power off/power on VM and check

 qm monitor NNN
 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

More information:

  1. man vm.conf
  2. http://www.kraxel.org/cgit/qemu/tree/docs/usb2.txt