Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Hostplug USB to a guest,then shutdown guest -> start guest,fail to hostplug USB to guest.
Shutdown guest,passthrough USB to guest,then start guest -> shutdown guest,after that,fail to start guest again.
Version-Release number of selected component (if applicable):
libvirt-0.9.10-3.el6.x86_64
virt-manager-0.9.0-10.el6.x86_64
How reproducible:
always
Steps to Reproduce:
# virsh nodedev-dumpxml usb_2_1
<device>
<name>usb_2_1</name>
<parent>usb_usb2</parent>
<driver>
<name>usb</name>
</driver>
<capability type='usb_device'>
<bus>2</bus>
<device>8</device>
<product id='0x1625'>DT 101 II</product>
<vendor id='0x0951'>Kingston</vendor>
</capability>
</device>
Hotplug:
1.Start a guest.
2.Prepare a USB xml with product + vendor.
#cat hostdev-usb-product.xml
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<product id='0x1625'/>
<vendor id='0x0951'/>
</source>
</hostdev>
3.#virsh attach-device rhel6.2-new hostdev-usb-product.xml
Device attached successfully
4.Shutdown guest,then start it.
5.Attach the USB device to gust again
# virsh attach-device rhel6.2-new hostdev-usb-product.xml
error: Failed to attach device from hostdev-usb-product.xml
error: Requested operation is not valid: USB device 002:010 is in use by domain ;�m
Passthrough:
1.Shutdown a guest.
2.Add the USB xml(product+vendor) to guest.
#virsh edit rhel6.2-new
...
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<product id='0x1625'/>
<vendor id='0x0951'/>
</source>
</hostdev>
...
3.Start the guest.Wait for the guest boot successfully,then shutdown it.
4.Start the guest again.
# virsh start rhel6.2-new
error: Failed to start domain rhel6.2-new
error: Requested operation is not valid: USB device 002:010 is in use by domain
Actual results:
As above
Expected results:
1.The usb can be hotplugged and the guest can be started successfully.
2.Restart libvirtd,the usb can works well.
Additional info:
The USB works well when hotplug/passthrough with bus and device.
dyuan,
You're right. The first round of patch that tried to fix bug 743671 turned out to be incomplete. Therefore I've posted the second round. However, the have missed upstream freeze phase, so they will be picked up by next release (0.9.12);
So I think we can close this one as a dup of bug 743671.
Laine?
Yes, this bug is fixed by the patches listed in https://bugzilla.redhat.com/show_bug.cgi?id=743671#c9 . They had been delayed because the full impact of *not* having them wasn't realized. So, completely fixing that bug will cause this bug to go away.
Description of problem: Hostplug USB to a guest,then shutdown guest -> start guest,fail to hostplug USB to guest. Shutdown guest,passthrough USB to guest,then start guest -> shutdown guest,after that,fail to start guest again. Version-Release number of selected component (if applicable): libvirt-0.9.10-3.el6.x86_64 virt-manager-0.9.0-10.el6.x86_64 How reproducible: always Steps to Reproduce: # virsh nodedev-dumpxml usb_2_1 <device> <name>usb_2_1</name> <parent>usb_usb2</parent> <driver> <name>usb</name> </driver> <capability type='usb_device'> <bus>2</bus> <device>8</device> <product id='0x1625'>DT 101 II</product> <vendor id='0x0951'>Kingston</vendor> </capability> </device> Hotplug: 1.Start a guest. 2.Prepare a USB xml with product + vendor. #cat hostdev-usb-product.xml <hostdev mode='subsystem' type='usb' managed='yes'> <source> <product id='0x1625'/> <vendor id='0x0951'/> </source> </hostdev> 3.#virsh attach-device rhel6.2-new hostdev-usb-product.xml Device attached successfully 4.Shutdown guest,then start it. 5.Attach the USB device to gust again # virsh attach-device rhel6.2-new hostdev-usb-product.xml error: Failed to attach device from hostdev-usb-product.xml error: Requested operation is not valid: USB device 002:010 is in use by domain ;�m Passthrough: 1.Shutdown a guest. 2.Add the USB xml(product+vendor) to guest. #virsh edit rhel6.2-new ... <hostdev mode='subsystem' type='usb' managed='yes'> <source> <product id='0x1625'/> <vendor id='0x0951'/> </source> </hostdev> ... 3.Start the guest.Wait for the guest boot successfully,then shutdown it. 4.Start the guest again. # virsh start rhel6.2-new error: Failed to start domain rhel6.2-new error: Requested operation is not valid: USB device 002:010 is in use by domain Actual results: As above Expected results: 1.The usb can be hotplugged and the guest can be started successfully. 2.Restart libvirtd,the usb can works well. Additional info: The USB works well when hotplug/passthrough with bus and device.