qm monitor usb_add / usb_del problems

sweet-t

New Member
Oct 22, 2012
19
2
1
I cannot add or delete a usb device through qm monitor as expected

I am trying to load generic usb mouse device due to likely unsupported usb tablet device - making mouse integration through pve console impossible; just as described here:
http://forum.proxmox.com/archive/index.php/t-2286.html

but Ive had no success with qm monitor even when adding devices with host device id

Code:
qm> info usb
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
qm> usb_del 0.2
could not delete USB device '0.2'
qm> usb_add mouse
could not add USB device 'mouse'
qm> usb_add host:046d:c05a
could not add USB device 'host:046d:c05a'

root@prox1:/etc/pve/nodes# qm set 700 -usb0 host=046d:c05a
update VM 700: -usb0 host=046d:c05a

qm> info usb
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 1.2, Port 1, Speed 1.5 Mb/s, Product USB Optical Mouse
qm> usb_del 1.2
could not delete USB device '1.2'

pve-manager/3.1-21/93bf03d4 (running kernel: 2.6.32-26-pve)


Any ideas whats wrong?
 
what OS do you try to install?
 
what OS do you try to install?

This particular KVM is running OS X 10.6.5

But I am having identical issues also with a CentOS 6.5 install.

qm monitor wont allow me to make any usb changes

CentOS 6.5
Code:
qm> info usb
  Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
qm> usb_add mouse
could not add USB device 'mouse'
qm> usb_del 0.2
could not delete USB device '0.2'
 
This particular KVM is running OS X 10.6.5

[off topic] could you share your config? I bought an OSX disc some time ago (probably snow leopard), just to learn the system, but was never able to use that virtualized (tried on virtualbox, always failed). about 30 euros wasted, until now :)
Trying it on pve (even if I know is not not apple-legal) would be interesting.[/off topic]

Thx, Marco
 
if you just want to disable tablet, you can do it in gui options.
I tried removing the tablet and re-installing the OS. This prompts a message on first boot (after install) that its missing a keyboard (where I am unable to proceed) and the mouse still doesnt work.

Trying to add a usb mouse and keyboard on VM conf file fails
Code:
args: -usb -device usb-kbd -device usb-mouse
or
Code:
args: -usb -usbdevice keyboard -usbdevice mouse

Each time resulting in failure to start

Code:
kvm:
 -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2: PCI: slot 1 
function 2 not available for piix3-usb-uhci, in use by piix3-usb-uhci
kvm: -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2: Device 'piix3-usb-uhci' could not be initialized

These usb devices are integral to KVM so im not sure whats wrong. http://www.linux-kvm.org/page/USB
I still think this would be easier if qm monitor was working. usb_add mouse should work. But I cannot make any such changes with qm monitor on any kvm.

[off topic] could you share your config? I bought an OSX disc some time ago (probably snow leopard), just to learn the system, but was never able to use that virtualized (tried on virtualbox, always failed). about 30 euros wasted, until now :)
Trying it on pve (even if I know is not not apple-legal) would be interesting.[/off topic]

As soon as I have a working desktop I'll write something up for this build. I'm looking at http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/ to consider later version builds of OSX.
Until I can add a usb-mouse to kvm Im going to painfully try to use the host mouse (sync is terrible) to enable screen sharing so I can manage it via VNC. This doesnt seem like the best practice for build instructions.
 
Hi, the usb doc from kvm wiki is really old

you can try to disable usb-tablet in option, then add to

args : -device usb-mouse,id=usbmouse,bus=uhci.0,port=1


(you need to specify the usb bus, same for usb hotplug)


(Note that if you disable table, the default mouse is a ps2 mouse, but maybe it doesn't work with macosx ?)
 
Hi, the usb doc from kvm wiki is really old

you can try to disable usb-tablet in option, then add to

args : -device usb-mouse,id=usbmouse,bus=uhci.0,port=1


(you need to specify the usb bus, same for usb hotplug)


(Note that if you disable table, the default mouse is a ps2 mouse, but maybe it doesn't work with macosx ?)

Spirit, that did it. Thanks.
I had installed PS/2 kexts so we're working.

While this fixes my mouse issue in the vm, the issue and subject is for qm monitor. I'm not sure if this is confirmed to report as a bug or if its unsporrted now and my behavior is expected.
 
Spirit, that did it. Thanks.
I had installed PS/2 kexts so we're working.

While this fixes my mouse issue in the vm, the issue and subject is for qm monitor. I'm not sure if this is confirmed to report as a bug or if its unsporrted now and my behavior is expected.


usb_add , usb_del from monitor are use to hotplug usb passthrough device (real devices connected to the host).

you can use device_add for virtual usb-tablet,usb-mouse....

"device_add driver=usb-tablet,id=tablet,bus=uhci.0,port=1"

from monitor:

# device_add driver=usb-mouse,id=usb-mouse,bus=uhci.0,port=2

# info mice
Mouse #0: QEMU PS/2 Mouse
Mouse #1: QEMU HID Tablet (absolute)
* Mouse #2: QEMU HID Mouse
 
args : -device usb-mouse,id=usbmouse,bus=uhci.0,port=1

Well Im now seeing mixed results. I had some success and now trying to resolve an issue getting the network working.
But, now I cant get the usb-mouse to load again ;\

Starting a VM with the above args fails
Code:
[COLOR=#000000][FONT=tahoma]kvm: -device usb-mouse,id=usbmouse,bus=uhci.0,port=1: Bus 'uhci.0' not found[/FONT][/COLOR]

Any thoughts?
 
I realise this is an old topic, but for the benefit of future explorers... The problem is that Proxmox's generated qemu commandline calls -readconfig pve-q35.cfg *after* it includes your "args". So when your args refers to the uhci.0 bus, it hasn't been defined by pve-q35.cfg yet, and the reference fails.

The only way I found to get around this was to add my device definition to the end of /usr/share/qemu-server/pve-q35.cfg instead, so it gets included in the right order.
 

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!