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:
After attaching a usb storage device from host to a guest, host /dev/sdX (assume this is the USB storage device), /dev/sdX disappeared correctly, and then detach it from guest, /dev/sdX should appear, but actually /dev/sdX didn't show up.
Version-Release number of selected component (if applicable):
2.6.32-189.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1.attach a USB storage device from host to a guest
host# lsusb | grep
host# ls /dev/sd*
/dev/sda /dev/sdb1 /dev/sdb2 ---/dev/sdb is the USB device will be attached
guest# ls /dev/sd*
No such file or directory
host# virsh attach-device 1 usb.xml
Device attached successfully
host# ls /dev/sd*
/dev/sda
guest# ls /dev/sd*
/dev/sda /dev/sda1 ---/dev/sda is the attached USB device---
(USB device successfully attached to guest)
2.detach it
host# virsh detach-device 1 usb.xml
Device detached successfully
guest# ls /dev/sd*
No such file or directory ---/dev/sda is not here because we just detached it
host#ls /dev/sd*
/dev/sda ---/dev/sdb is missing which shouled be here
Actual results:
/dev/sdb missing
Expected results:
/dev/sdb appear after detach
Additional info:
Try with 3 combinations USB3 device on USB2 port, USB2 device on USB3 port, USB2 device on USB2 port.All of them have this issue.
host# cat usb.xml
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x0bc2' />
<product id='0x50a1' />
</source>
</hostdev>
vendor id and product id can be found by running lsusb
(In reply to comment #4)
> In addition, please provide your libvirt version.
And your qemu-kvm version is also important, the following is a qemu-kvm known bug about usb:
https://bugzilla.redhat.com/show_bug.cgi?id=733272
So you had better give libvirt and qemu-kvm version in here.
Alex
(In reply to comment #6)
> (In reply to comment #4)
> > In addition, please provide your libvirt version.
>
> And your qemu-kvm version is also important, the following is a qemu-kvm known
> bug about usb:
> https://bugzilla.redhat.com/show_bug.cgi?id=733272
>
> So you had better give libvirt and qemu-kvm version in here.
>
> Alex
Hi, Alex,
Sorry,I didn't record the original test environment.
But I just test with
libvirt-0.9.4-12.el6.x86_64
qemu-kvm-0.12.1.2-2.192.el6.x86_64
and this issue is still there.
This is a RFE for libvirt, we don't reattach the managed USB device to host if attaching fails/detaching succeeded/starting fails/destroy succeeded, just like what for PCI device.