Usb keys (again) with same vendor and id

slapshot

Renowned Member
Feb 28, 2012
58
0
71
Hi,

in a windows VM I was able to push a usb key using this: qm set 100 -usb0 host=6666:7b3c

Now, I have a second usb key of the same type, so with the same id and vendor.

Here is my lsusb
Code:
root@proxmox:~# lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 005: ID 6666:7b3c Prototype product Vendor ID
Bus 004 Device 004: ID 6666:7b3c Prototype product Vendor ID

How can I push it in a second windows VM ? I searched the forum and found something about using bus and device id but it was using usbhost parameter which I asume it was for different versions of qm.

Further, I tried to push the same key into 2 different VM but of course it is exclusive. Is there a way to share just one usb key in two vm without clash ?



Thank you
 
Thank you for your reply. Please, I need a bit of help. I'm trying but I'm missing something, of course. This is lssub output:

Code:
Bus 004 Device 005: ID 6666:7b3c Prototype product Vendor ID
Bus 004 Device 004: ID 6666:7b3c Prototype product Vendor ID

I was able to inject the first usbkey with host=6666:7b3c.

Now, on the server I have a second similar usb key, I think the second one in the list above. Here is lsusb -t output:

Code:
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/4p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
    |__ Port 2: Dev 5, If 0, Class=HID, Driver=usbhid, 1.5M
    |__ Port 3: Dev 4, If 0, Class=HID, Driver=usbfs, 1.5M
    |__ Port 5: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M
    |__ Port 5: Dev 2, If 1, Class=HID, Driver=usbhid, 1.5M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M

I tried to inject into VM 102 with this command, after many attempts with parsing errors because I did not understand the syntax:

Code:
qm set 102 -us0 host=4-3.4

This one is ok but I cannot see into VM the usb key :O. I tried also 4-5.2 but nothing to do :(

What am I missing ?

Thank you
 
Ok, I used dmesg output when I disconnected and attached again the usb key. So, when I disconnected I had:
Code:
usb 4-2: USB disconnect, address 5

so I think is it host=4-2.5, that's right ?

Following dmesg output when I attached the key again:
Code:
usb 4-2: new low speed USB device using ohci_hcd and address 6
usb 4-2: New USB device found, idVendor=6666, idProduct=7b3c
usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-2: Product: ExseKey USB
usb 4-2: Manufacturer: Clover Informatica
usb 4-2: SerialNumber: ã¨
usb 4-2: configuration #1 chosen from 1 choice
generic-usb 0003:6666:7B3C.009F: hiddev96,hidraw2: USB HID v1.00 Device [Clover Informatica ExseKey USB] on usb-0000:00:12.0-2/input0

... and it seems it started using addr 6.

Now, I injected host=4-2.5 and then 4-2.6 but nothing to do, the key was not read by my software :(. Of course, I stopped the VM and started it again for every qm set.

Any idea ?

Thank you very much.
 
What info do you get in the qemu monitor ('info usbhost')?

I got this:

Code:
qm> info usbhost  Bus 4, Addr 2, Port 5, Speed 1.5 Mb/s
    Class 00: USB device 04a5:7008, USB Multimedia Keyboard
  Bus 4, Addr 4, Port 3, Speed 1.5 Mb/s
    Class 00: USB device 6666:7b3c, ExseKey USB
  Bus 4, Addr 6, Port 2, Speed 1.5 Mb/s
    Class 00: USB device 6666:7b3c, ExseKey USB
  Auto filters:
    Bus 4, Addr *, Port 1.5, ID *:*
qm>
 
Yes, I need two similar keys for two vm different istances. Try to share just one key for both vm but with a clash.

Again it is added 2 time to one VM - I thought you do not want that? To clarify, please post the vm config - together with the 'info usbhost' output.
 
Again it is added 2 time to one VM - I thought you do not want that? To clarify, please post the vm config - together with the 'info usbhost' output.

Ok, well one key have to go into first vm id=100 (and it is because I used vendor_ID). The second key have to go on the second vm id=102. Here is the output:

102.conf
Code:
cat /etc/pve/nodes/proxmox/qemu-server/102.conf
bootdisk: ide0
cores: 1
ide0: local:102/vm-102-disk-1.raw
ide2: local:iso/windows7.iso,media=cdrom
memory: 768
name: Windows_7
net0: rtl8139=5A:2D:99:37:B1:40,bridge=vmbr0
ostype: win7
sockets: 1
usb0: host=4-2.6

Here is qm monitor info usbhost. You are right, here it seems added 2 times. But in config file there is just one row :O.

Code:
qm monitor 102
Entering Qemu Monitor for VM 102 - type 'help' for help
qm> info usbhost
  Bus 4, Addr 2, Port 5, Speed 1.5 Mb/s
    Class 00: USB device 04a5:7008, USB Multimedia Keyboard
  Bus 4, Addr 4, Port 3, Speed 1.5 Mb/s
    Class 00: USB device 6666:7b3c, ExseKey USB
  Bus 4, Addr 6, Port 2, Speed 1.5 Mb/s
    Class 00: USB device 6666:7b3c, ExseKey USB
  Auto filters:
    Bus 4, Addr *, Port 4.3, ID *:*

Thank you
 
Oh, you use PVE2.0 RC1?? You posted in the wrong forum!

arghh sorry :(. Anyway, I stopped many times VM ... but I'm confused now. In conf file there just one key injected, while in qm monitor there are two. Maybe I can try to erase the row in 102.conf file and let qm monitoring output as it is ?

Thank you.
 
Please can you test with '4-1.5' instead?

Ok, I started again from scratch. I removed from first and working VM 100 usb injection.

Now I will have VM 100 Windows XP and 107 Windows 7.

4-1.5 does not work :( and the key is not seen now on vm 100.

Here is my complete lsusb -t output. Now attached on the server I have just 1 usb key. The other one is off.

Code:
lsusb -t/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/4p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
    |__ Port 3: Dev 5, If 0, Class=HID, Driver=usbhid, 1.5M
    |__ Port 5: Dev 4, If 0, Class=HID, Driver=usbhid, 1.5M
    |__ Port 5: Dev 4, If 1, Class=HID, Driver=usbhid, 1.5M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M

Thank you
 
OK, seems the forum formats the output of 'lsbusb -t' in a wrong way. Please can you try to post it correctly formated - or provide a screenshot instead?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!