Description of problem: Using the new USB 2.0 pass-through feature with a standard USB memory stick, the initial guest boot (qemu-kvm) works great. If you shutdown the guest, and then try to restart the guest, you will get an error like: Error starting domain: Requested operation is not valid: USB device 002:004 is in use by domain "tus=0 serial=566\Uffffffff" Note that the string in quotes is always some garbage. If I restart libvirtd, I can then start the guest properly. Version-Release number of selected component (if applicable): libvirt GIT from 2012-03-23 How reproducible: Create a linux VM using virt-manager. Set Controller USB to 2.0 Add a USB Host device, any memory stick will do. startup guest shutdown guest startup guest Steps to Reproduce: 1. 2. 3. Actual results: Error saying USB device is in use by domain "XXXX" Expected results: Guest VM should start Additional info: Tried on Fedora 16, openSuse 12.1, archlinux, all with same results.
FYI, I recently pulled libvirt-git (2012-04-04) and the USB 2.0 pass-through is now working when the VM is re-started. This can now be closed.
Yes, the patches have been committed upstream: commit ea3bc548aca7b4c448b48863120ad35a7337c127 Author: Michal Privoznik <mprivozn> AuthorDate: Mon Mar 26 16:44:19 2012 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Wed Apr 4 15:09:41 2012 +0200 qemu: Build activeUsbHostdevs list on process reconnect If the daemon is restarted it will lose list of active USB devices assigned to active domains. Therefore we need to rebuild this list on qemuProcessReconnect(). commit e2f5dd6134ebeb6846450c7d7782273d3d274859 Author: Michal Privoznik <mprivozn> AuthorDate: Mon Mar 26 16:40:01 2012 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Wed Apr 4 15:09:41 2012 +0200 qemu: Delete USB devices used by domain on stop To prevent assigning one USB device to two domains, we keep a list of assigned USB devices. On domain startup - qemuProcessStart() - we insert devices used by domain into the list but remove them only on detach-device. Devices are, however, released on qemuProcessStop() as well. commit b2c7b9ee0e6f2203984035668c066be37f3a256a Author: Michal Privoznik <mprivozn> AuthorDate: Mon Mar 26 16:33:58 2012 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Wed Apr 4 15:09:41 2012 +0200 qemu: Don't leak temporary list of USB devices and add debug message when adding USB device to the list of active devices. Those patches will be part of next release. Therefore I am closing this as NEXTRELEASE.