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 730930 - RFE: The real "managed" support for host usb device
Summary: RFE: The real "managed" support for host usb device
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-16 09:34 UTC by WANG Chao
Modified: 2015-02-08 21:42 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-23 03:08:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description WANG Chao 2011-08-16 09:34:19 UTC
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

Comment 2 Qian Cai 2011-09-28 02:45:23 UTC
Looks like an userspace issue.

Comment 3 Alex Jia 2011-09-28 03:22:02 UTC
Libvirt hasn't well support USB2.0 now, and we have a bug to trace similar issues:
https://bugzilla.redhat.com/show_bug.cgi?id=715590

Comment 4 Alex Jia 2011-09-28 03:23:46 UTC
In addition, please provide your libvirt version.

Comment 5 Osier Yang 2011-09-28 04:13:03 UTC
I take this as a similiar bug in hand (#BZ 736214).

Comment 6 Alex Jia 2011-09-28 06:06:05 UTC
(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

Comment 7 WANG Chao 2011-09-28 06:47:57 UTC
(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.

Comment 8 Osier Yang 2011-10-14 02:37:57 UTC
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.

Comment 9 Dave Allan 2011-11-23 03:08:26 UTC
This should be done as part of the USB work to support USB > 1.0.  Closing as WONTFIX and this work will be rolled into that RFE.


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