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

Virt-Manager adds support for usb2

The most recent release of virt-manager tagged 0.9.1-1 released at the end of January 2012 now includes support for usb 2.x. In this post I'll briefly walk through the new virt-manager user interface for usb2. USB 2 support has been available by special command line options but not in a simple gui interface until now. This is something that qemu users have been wanting on for a long time and virt-manager now makes it easily accessible to the wider qemu/kvm user community.

Using USB2

Using usb2 is now included in virt-manager by way of a new ehci adapter. By default this usb controller interface is added to your virtual machines so there's nothing special you need to do except select the usb controller type availble in your virtual machine. Once you have upgraded to this version of virt-manager, look at your virtual machine details page and you'll see the new controller labelled as "Controller USB".  

One thing to note is that the default setting of the usb controller is set to "Default" which is actually usb1. This is not very clear in the user interface. Note: You must select the dropdown list and select "USB2" in order to use the machine's usb2 adapter. 

Once you've selected USB2, select "USB Host Device" as you normally would and select the host device on the right pane then Click on Finish.

If for some reason no device description shows up in your details page as the screenshot shows above you can open up a terminal and issue the lsusb command to list the usb devices with their corresponding addresses.

Removing the usb device from your virtual machine works just as the old interface did; select your usb device from the details page and click "Remove" then apply.

The nice thing about the usb2 interface over usb1 is that there's no need to reboot in order to attach and detach usb devices. Just be aware that the default setting is usb1.

See Also


Problem adding usb device to window server using virt manager.

I am facing problem while adding the usb drive to windows server 2008 guest.I can see the device using virt-manager and are able too add it.But problem is when i check the device on guest using device manager it shows an exclamation mark suggesting device can't be started with error code 10.

Thanks in advance for Help.

"Controller USB" Not Found

when I created a new machine I can't find the usb controller as shown in picture

I am using ubuntu 12.04 with virt-manager 0.9.1

It has taken a fair bit of

It has taken a fair bit of digging, but I've got this working on my system now. For others having the same trouble, the 'trick' to get 'Controller USB' in virt-manager is to edit the XML for the VM to add the USB2 controller. For my VM 'test' I used 'virsh edit test' to open the XML, and added the following lines to the '<devices>' section:

<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>

Once those were added, and the VM started up, 'Controller USB' shows up as a USB2 controller in virt-manager, the EHCI controller is visible to my guest OS, and the attached USB2 drive works at full speed.

It took some reading...and this, but not complete yet

Volta, Awesome work. Thank you! I added the snippet you had above and was then able to see a Controller USB and was able to add my USB drive which was then visible in Windows 7.

I have not been able to figure out hot swapping though. Any luck or tips with that?


Same problem with Ubuntu

Same problem with Ubuntu 13.04, but thanks to "Volta" I could solve this.

"Virt-Manager adds support for usb2"...or was it Mr. Volta?!

Same problem with me....

I have the same problem...my VM with windows server 2k8 does not recognize the USB PenDrive....it show a new hardware usb...but does not "install the driver"...some one have the solution for this problem ?

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.