Virtualisation in RHEL & USB device allocation to VMs

Latest response

Hi.  Technically not RHEV, but virtualisation within RHEL, so not sure if this needs to be moved.

RHEL 6.2

The issue is, I have multiple USB devices (soundcards, and also tested with USB license dongles) attached to the host.  Say for example I have 2 USb soundcards (both with same device/vendor id), one on 001:003 and the other on 001:004, with the goal of having each one attached to a seperate VM.  If I go through and add each one to a VM through virt-manager, they both come up actually listed as the same bus/device id.  eg, both VMs will say they have 001:003. (or 001:004)


If I check the log files of each VM and look at the command that it is using to start up the machine, the -usb-device is the same for each one.


I've attempted with a different USb device, in this case there were 3 USB licence dongles.  2 the same and 1 different.  Attempting to add these to various guests, even if I chose one of the 2, it would add the 1 that was different. (hope this makes sense.)


In short, I think there might be a bug with the way USb devices are added.


I have tried manually editing the xml config for each guest with the <address bus='001' device='003'> and it makes no difference, they both still try to use the same soundcard.


As an aside, can someone please advise if it is possible to modify the command that the VMs use to start up?  Or is it a consolidation of the XML file that it puts together at startup?


Thanks in advance,


Hi Owen,

Rather than move this discussion, I've cross-posted it to both Groups. Hopefully this will help to get you some answers.

Thanks David.


Also to add info to this post in case anyone else is coming across the same issue - we updated manually to the latest virt-manager, and virtinst (and required dependencies) and the problem appears to be resolved.  Now a virtual machine will not start up if it sees multiple similar USB devices and they are not specifically allocated by using the <address> tag in the xml file.


Will test further to make sure the issue is resolved.

Ok further update.  After adding a seperate USB soundcard to 2 different VMs, one on 001:003 and the other on 001:004, they appear correctly in virt-manager initially.  However when starting both VMs, they revert back to allocating 001:003 to both VMs.