This issue was fixed for few years but only in virt-manager,
virt-install has the same bug. If you have two USB devices with same
vendor and product ID, you need to use also address element to create
a valid XML to define that device into a guest.
This patch moves the logic from vmmAddHardware into VirtualHostDevice in
order to not duplicate that code for virt-manager and virt-install.
Also update the tests files to properly check this functionality. I've
changed the USB device according the 'tests/testdriver.xml' and picked
one of the USB HUBs, because they have the same vendor and product ID.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1230611
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Libvirt can generated invalid XML for the system nodedev device:
https://bugzilla.redhat.com/show_bug.cgi?id=1184131
This hits at least two people, so catch this specific case, but the
real fix is libvirt not outputing busted XML.
Updated by this script:
find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\) \(.*[^#]\)$|\1 \2|g" \{\} \;
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.
The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
When there are multiple usb devices with same vendor/product
in the host device list, the bus/addr is going to be used when
attaching one of usb devices.
Currently is_dup flag is only useful to VirtualHostDeviceUSB.
I put get_nodedevs_number() in connection.py, so the startup
hooks can use it.