problems with usb_add

sir.jan

New Member
Jan 2, 2012
7
0
1
Germany
Hello,

I want to add a HASP HL Dongle to a Windows Guest system.

I use the monitor to add the device.

Code:
qm> info usbhost  Bus 6, Addr 2, Port 1, Speed 12 Mb/s
    Class 00: USB device 03f0:7029, Virtual Keyboard 
  Bus 4, Addr 2, Port 1, Speed 1.5 Mb/s
    Vendor Specific: USB device 0529:0001, HASP HL 3.21

But every time I use the usb_add-command i get the following error:

Code:
qm> usb_add host:0529:0001
usb_create: no bus specified, using "usb.0" for "usb-host"

Can you help me to solve the Problem?

Regards

Jan
 
Is there any way to do this on startup of the vm?
The <vmid>.conf files in /etc/qemu-server seem to be removed in 2.0 or are they still processed when present?
 
see /etc/pve/nodes/...
 
I executed the command via the monitor within the webinterface - the config file in /etc/pve/nodes/.. doesn't contain the usb_add entry and this morning the USB dongle wasn't attached to the VM after restarting the VM...

I modified the .conf manually, i'll give it a try this evening as soon as i can restart the server.
 
"qm set <VMID> -usb0 host=0529:0001" or "usb_add host:xxxx:xxxx" added to the /etc/pve/nodes/.../<vmid>.conf doesn't work to add the HASP at startup. I still have to add it via usb_add in the qm monitor.

is there any config file/script executed at vm startup besides the above mentioned one?
 
Hello Guys!

When i try to add the HASP dongle with usb_add in the monitor, then my VM shuts down. Do you have any idea whats wrong?

I also tried the "qm set" solution but when i type qm set "id" -usb0 host:"ID:ID" then i get the information unknown command: 'qm' or 'set'

I'm thankful for any suggestion or help

edit: when i use info usbhost, i got the following output:

using sys file-system with /dev/bus/usb
Bus 5, Addr 2, Port 2, Speed 1.5 Mb/s
Vendor Specific: USB device 0529:0001, Hardlock USB 1.12
Bus 6, Addr 2, Port 1, Speed 12 MB/s
Class 00: USB device 03f0:1027, Virtual Keyboard

so it seems the device is allready mounted? why can't i see/use it in the guest system (windows xp sp3)

regards

jannis
 
Last edited:
I also tried the "qm set" solution but when i type qm set "id" -usb0 host:"ID:ID" then i get the information unknown command: 'qm' or 'set'

Please can you port the exact command, including the exact error message?
 
I typed in the monitor qm set 303 -usb0 host:0529:0001 and press enter. Then the message unknown command "qm" appears. I also tried set 303 -usb0 host:0529:0001 with the message "unknown command set"

Later last day i connected via cygwin on the proxmox Server, shutdown the vm and also tried the command "qm set 303 -usb0 host=0529:0001. Then i got the message "unknown command usb0"

The strange thing is, when i forwarded the dongle the last time, with usb_add host:0529:0001 there was no problem. Now the vm shuts down immediately.

I really need to solve this problem. Btw im running the Kernel_Version 2.6.32-6. Maybe is there a problem?


regards

jannisK
 
I typed in the monitor qm set 303 -usb0 host:0529:0001 and press enter. Then the message unknown command "qm" appears. I also tried set 303 -usb0 host:0529:0001 with the message "unknown command set"

Please login to the pve host via ssh, then exec that command (it is a shell comand, not a qemu menitor command).
 
I also tried this, # qm set 303 -usb0 host=0529:0001 but then i get the error "Unknown option: usb0"

I tried some other things for example editing the vmid.conf in etc/qemu-server/ When i add hostusb:0529:0001 to the config and click on the "start" button in the webinterface he starts and 3-4 seconds later he stop.
 
Sadly the problem still exists. Tried several methods of resolution but nothing works.

1. In the monitor usb_add host:0529:0001 -> message "usb_create: no bus specified, using "usb.0" for "usb-host"
husb: using sys file-system with /dev/bus/usb" -> VM shuts down in an Instant.

2. Logged in the server with an ssh tool, went to etc/qemu-server/vmid.conf and added hostusb: 0529:0001 manually. Safed the config and STOP/START the VM. -> Seconds after i pressed START, it stopped. can't even open an vnc window

3. Logged in the server with an ssh tool and tried # qm set 303 -hostusb 0529:0001. Line was added in the vmid.conf but aber STOP/START the same problem as in step 2

lsusb detects the dongle and info usbhost shows the usbdongle with its vendor and product_id. BUT when i type "info usb" in monitor it only shows device 0.1 the qemu virtual keyboard

Some details of the running system:

pveversion-v:

pve-manager: 1.9-26 <pve-manager/1.9/6567>
running kernel: 2.6.32-6-pve
proxmox-ve-2.6.32: 1.9-55
qemu-server: 1.1-32
pve-firmware: 1.0-14
libpve-storage-perl: 1.0-19
vncterm: 0.9-2
vzctl: 3.0.29-3pve1
vzdump: 1.2-16
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.15.0-2
ksm-control-deamon: 1.0-6

Hope somebody can help me with my problem!!

Regards

JannisK

edit:

Allright guys, i could solve the problem on my owne. It was a problem with the pve-qemu-kvm version. I copied the Vm to another Node with a lower version running and adding the usb dongle was no problem.

Now i just need to downgrade pve-qemu-kvm: 0.15.0-2 to 0.15.0-1
 
Last edited:
pveversion -v
pve-manager: 2.0-28 (pve-manager/2.0/30bb4d33)
running kernel: 2.6.32-6-pve
pve-kernel-2.6.32-6-pve: 2.6.32-55
lvm2: 2.02.88-2pve1
clvm: 2.02.88-2pve1
corosync-pve: 1.4.1-1
openais-pve: 1.1.4-1
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-1
pve-cluster: 1.0-22
qemu-server: 2.0-17
pve-firmware: 1.0-15
libpve-common-perl: 1.0-14
libpve-access-control: 1.0-11
libpve-storage-perl: 2.0-11
vncterm: 1.0-2
vzctl: 3.0.30-2pve1
vzprocps: 2.0.11-2
vzquota: 3.0.12-3

Windows 2003 shootdown after usb_add
 
then qm set 101 -usb0 host=0781:556b all ok
but, i'm need add all host usb in vm...

lsusb:
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0557:2221 ATEN International Co., Ltd
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 009: ID 0781:556b SanDisk Corp.
Bus 001 Device 002: ID 05e3:0719 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hulsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0557:2221 ATEN International Co., Ltd
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 009: ID 0781:556b SanDisk Corp.
Bus 001 Device 002: ID 05e3:0719 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

> qm set 101 -usb0 host=1.1
400 Parameter verification failed.
usb0: invalid format - unable to parse usb device
 
Last edited: