Grimoire-Command.es

GNU+Linux command memo

Let KVM guest access USB host devices

Rendre des périphériques USB accessible dans un client KVM

$ sudo kvm -usb -usbdevice host:$xxxx:$xxxx (1)
$ sudo kvm -M q35 -usb -usbdevice host:$xxxx:$xxxx (2)
$ sudo kvm -device nec-usb-xhci,id=xhci -device usb-host,hostbus=$x,hostaddr=$xx,bus=xhci.0 (3)
1 For USB 1.0 / 1.1
2 For USB 2.0
3 For USB 3.0 / 3.1

To discover your USB peripheral host references (bus and address) :

$ lsusb

Can also be used to verify the presence of the USB peripheral in the guest KVM virtual machine.