KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

KVM-74 will support USB device automatic connect and disconnect

USB autoconnect and disconnect are slated for the next release of KVM.  You should be typing usb_add monitor commands much less for supporting usb devices and will not have to type usb_del anymore after disconnecting usb devices. In order for autoconnect to work however, you have to provide the usb_add command an expression representing your usb device that it will periodically scan for. So, for example, if you enter the following command from your monitor with just the vendor id of your usb device.

(qemu) usb_add host:1234:*

This will match any host usb devices beginning with vendor id 1234 and any values for product id. It will check periodically for the existence of any usb devices matching this pattern and connect the device if it exists. For usb autodisconnect there’s nothing to do. Your virtual machine will periodically scan for the usb device and automatically remove it if it’s not detected.
 

See Also

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.