Bug 640332

Summary: add serial number to qemu-kvm usbdevice parameter
Product: [Fedora] Fedora Reporter: Helge Deller <helge.deller>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: amit.shah, berrange, clalance, crobinso, dwmw2, extras-orphan, itamar, jaswinder, jforbes, knoel, ondrejj, quintela, scottt.tw, tburke, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 986343 (view as bug list) Environment:
Last Closed: 2012-12-14 19:04:43 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Helge Deller 2010-10-05 11:08:40 EDT
Description of problem:

KVM allows to passthrough USB devices to the virtual machine.
This is done with the --usbdevice parameter. Syntax is:
–usbdevice  host:1234:5678,
where 1234=vendor id, and 5678=product id.

But there is a problem if you have two *identical* USB devices (e.g. two smartcard readers, or two USB mice), in which case it's not possible to direct one USB device to virtual machine 1 and the second USB device to virtual machine 2. This happens for *identical* USB devices, where the vendor id and the product id is the same for botth.

In Virtualbox for example it's possible to distingish those devices. They realized it by adding a third parameter, the Serial number of the USB device.
This value is given in the "lsusb" output as "iSerial" field.

How reproducible:
Just add two identical USB devices (e.g. smartcard readers or USB mice from the same vendor) and try to pass each of them to different virtual machines.


Additional info:
My proposal is, that in qemu-kvm the --usbdevice parameter should be extended like this
--usbdevice host:<vendor id>[:<product id>[:<serial number>]

In addition corresponing options to select that in virt-manager would be helpful as well.
Comment 1 Daniel Berrange 2010-10-06 09:44:15 EDT
The '-usbdevice' argument is one of the legacy syntax options with QEMU.  USB devices are now specified using the generic '-device' option. None the less, it should be possible to make this new argument take a USB serial number as you suggest.
Comment 2 Fedora Admin XMLRPC Client 2012-03-15 13:58:43 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Cole Robinson 2012-12-14 19:04:43 EST
I've moved this RFE to the upstream qemu tracker:

https://bugs.launchpad.net/qemu/+bug/1090602