RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1230611 - Install a guest failed with --hostdev bus.device when two usb device have same product and vendor id
Summary: Install a guest failed with --hostdev bus.device when two usb device have sam...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.2
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-11 08:57 UTC by Xiaodai Wang
Modified: 2015-11-19 05:26 UTC (History)
3 users (show)

Fixed In Version: virt-manager-1.2.1-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:26:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
debug log info (5.70 KB, text/plain)
2015-06-11 08:57 UTC, Xiaodai Wang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2206 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2015-11-19 08:17:29 UTC

Description Xiaodai Wang 2015-06-11 08:57:22 UTC
Created attachment 1037558 [details]
debug log info

Description of problem:
Install a guest failed with --hostdev bus.device when two usb device have same product and vendor id.

Version-Release number:
virt-manager-1.2.0-4.el7.noarch
virt-manager-common-1.2.0-4.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Plug two usb devices which have same product and vendor id.
# lsusb
Bus 002 Device 023: ID 15e1:2007 RSA RSA SecurID (R) Authenticator
Bus 002 Device 019: ID 15e1:2007 RSA RSA SecurID (R) Authenticator
2. Run virt-install command with --hostdev bus.device.
# virt-install -n new -r 1024 -f /var/lib/libvirt/images/demo.img  -s 6 --host-device 002.019 --vnc --import --force

Actual results:
# virt-install -n new -r 1024 -f /var/lib/libvirt/images/demo.img  -s 6 --host-device 002.019 --vnc --import --force
WARNING  Unable to connect to graphical console: virt-viewer not installed. Please install the 'virt-viewer' package.
WARNING  No console to launch for the guest, defaulting to --wait -1

Starting install...
ERROR    operation failed: Multiple USB devices for 15e1:2007, use <address> to specify one
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start new
otherwise, please restart your installation.

Expected results:
The guest should be installed successfully.

Comment 2 Pavel Hrdina 2015-07-23 11:15:26 UTC
Upstream patch proposed:

https://www.redhat.com/archives/virt-tools-list/2015-July/msg00118.html

Comment 3 Pavel Hrdina 2015-08-05 11:40:12 UTC
Upstream commit:

commit b06c91d2fc23644bfb13e174c7441f8a00c17477
Author: Pavel Hrdina <phrdina>
Date:   Thu Jul 23 13:15:26 2015 +0200

    hostdev: add an address element for USB host devs if necessary
    
    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>

Comment 7 fwu 2015-08-12 03:18:23 UTC
I can reproduce this bug with package:
virt-manager-1.2.1-4.el7.noarch
virt-manager-common-1.2.1-4.el7.noarch

Steps are the same as description above.

Then try to verify with new build:
virt-manager-1.2.1-5.el7.noarch

Steps:
1. Plug two usb devices which have same product and vendor id.
# lsusb
Bus 004 Device 003: ID 15e1:2007 RSA RSA SecurID (R) Authenticator
Bus 004 Device 002: ID 15e1:2007 RSA RSA SecurID (R) Authenticator
2. Run virt-install command with --hostdev bus.device.
virt-install -n new -r 1024 -f /var/lib/libvirt/images/test.img --host-device 004.003--vnc --import

Results:
After step 2, message appears:
Starting install...
Creating domain...                                       |    0 B     00:00     

The guest was installed successfully.

According to the result above in the latest version of virt-manager, move this bug from ON_QA to VERIFIED.

Comment 9 errata-xmlrpc 2015-11-19 05:26:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2206.html


Note You need to log in before you can comment on or make changes to this bug.