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 813713 - Windows guest can't drive more than 21 usb-storage devices
Summary: Windows guest can't drive more than 21 usb-storage devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 812328
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-18 09:37 UTC by Qingtang Zhou
Modified: 2013-02-21 07:33 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.306.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 812328
Environment:
Last Closed: 2013-02-21 07:33:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cmd line of qemu-kvm (6.33 KB, text/plain)
2012-04-18 09:37 UTC, Qingtang Zhou
no flags Details
output of devcon.exe (58.25 KB, text/plain)
2012-04-18 09:45 UTC, Qingtang Zhou
no flags Details
initial boot 23 disks (83.34 KB, image/png)
2012-11-29 02:15 UTC, Shaolong Hu
no flags Details
after reboot 24 disks (83.25 KB, image/png)
2012-11-29 02:16 UTC, Shaolong Hu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0527 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2013-02-20 21:51:08 UTC

Description Qingtang Zhou 2012-04-18 09:37:51 UTC
Created attachment 578289 [details]
cmd line of qemu-kvm

Description of problem:
when assigned 24 'usb-storage' devices to a windows guest, this guest can only recognize 20 devices of them, other 2 devices has following status in "Device Manager":
"""
Windows cannot load the device driver for this hardware because there is a duplicate device already running in the system. (Code 42)
"""
(This status message is a bit different in Win7 guest.)

I met this problem on WinXP/Win2003/Win7 guest. Tested RHEL6 guest, all usb-storage devices are found.


Version-Release number of selected component (if applicable):
# rpm -q kernel
kernel-2.6.32-262.el6.x86_64

# rpm -qa |grep qemu
qemu-kvm-tools-0.12.1.2-2.276.el6.x86_64
qemu-img-0.12.1.2-2.276.el6.x86_64
gpxe-roms-qemu-0.9.7-6.9.el6.noarch
qemu-kvm-0.12.1.2-2.276.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. assign 24 usb-storages to guest.
2. Start the guest with those disks.
3. Only 20 usb-storage device can be used in windows.
  
Actual results:


Expected results:


Additional info:
qemu-kvm cmd line:
(actual cmd line is very long, I'll send it as a attachment)
# qemu ... \
-device usb-ehci,id=usb1,bus=pci.0,addr=0x4 \
-device usb-ehci,id=usb2,bus=pci.0,addr=0x5 \
-device usb-ehci,id=usb3,bus=pci.0,addr=0x6 \
-device usb-ehci,id=usb4,bus=pci.0,addr=0x7 \
-drive file='/home/autotest-devel/client/tests/kvm/stg0.qcow2',if=none,id=usb2.0,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=1,drive=usb2.0 \
-drive file='/home/autotest-devel/client/tests/kvm/stg1.qcow2',if=none,id=usb2.1,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=2,drive=usb2.1 \
-drive file='/home/autotest-devel/client/tests/kvm/stg2.qcow2',if=none,id=usb2.2,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=3,drive=usb2.2 \
-drive file='/home/autotest-devel/client/tests/kvm/stg3.qcow2',if=none,id=usb2.3,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=4,drive=usb2.3 \
-drive file='/home/autotest-devel/client/tests/kvm/stg4.qcow2',if=none,id=usb2.4,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=5,drive=usb2.4 \
-drive file='/home/autotest-devel/client/tests/kvm/stg5.qcow2',if=none,id=usb2.5,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=6,drive=usb2.5 \
...

Comment 1 Qingtang Zhou 2012-04-18 09:45:16 UTC
Created attachment 578293 [details]
output of devcon.exe

$ grep "Name: USB Mass Storage Device" dev_list|wc -l
22
$ grep "Name: QEMU QEMU HARDDISK USB Device" dev_list |wc -l
20

Comment 3 Gerd Hoffmann 2012-04-20 12:42:04 UTC
The usb devices need unique serial numbers.
http://patchwork.ozlabs.org/patch/154012/

Comment 7 Gerd Hoffmann 2012-07-13 11:48:11 UTC
patches posted.

Comment 13 Shaolong Hu 2012-10-26 09:58:56 UTC
Test with qemu-kvm-rhev-0.12.1.2-2.331.el6.x86_64:

Attach 24 usb storage device to a win7 guest, in guest device manager, can see 24 "USB Mass Storage Device" under "Universal Serial Bus controllers", but in "Disk Management", only see 23.


CMD:

/usr/libexec/qemu-kvm \
-name vm1 \
-chardev socket,id=qmp_monitor_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20120417-201603-0CS2,server,nowait \
-mon chardev=qmp_monitor_id_qmpmonitor1,mode=control \
-chardev socket,id=serial_id_20120417-201603-0CS2,path=/tmp/serial-20120417-201603-0CS2,server,nowait \
-device isa-serial,chardev=serial_id_20120417-201603-0CS2 \
-device usb-ehci,id=usb1,bus=pci.0,addr=0x4 \
-device usb-ehci,id=usb2,bus=pci.0,addr=0x5 \
-device usb-ehci,id=usb3,bus=pci.0,addr=0x6 \
-device usb-ehci,id=usb4,bus=pci.0,addr=0x7 \
-drive file=nfs/win7-64-virtio.qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,boot=on,snapshot=off,readonly=off,format=qcow2,aio=native \
-device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive-virtio-disk1,id=virtio-disk1 \
-drive file=disk1,if=none,id=usb2.0,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=1,drive=usb2.0 \
-drive file=disk2,if=none,id=usb2.1,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=2,drive=usb2.1 \
-drive file=disk3,if=none,id=usb2.2,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=3,drive=usb2.2 \
-drive file=disk4,if=none,id=usb2.3,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=4,drive=usb2.3 \
-drive file=disk5,if=none,id=usb2.4,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=5,drive=usb2.4 \
-drive file=disk6,if=none,id=usb2.5,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb1.0,port=6,drive=usb2.5 \
-drive file=disk7,if=none,id=usb2.6,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb2.0,port=1,drive=usb2.6 \
-drive file=disk8,if=none,id=usb2.7,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb2.0,port=2,drive=usb2.7 \
-drive file=disk9,if=none,id=usb2.8,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb2.0,port=3,drive=usb2.8 \
-drive file=disk10,if=none,id=usb2.9,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb2.0,port=4,drive=usb2.9 \
-drive file=disk11,if=none,id=usb2.10,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb2.0,port=5,drive=usb2.10 \
-drive file=disk12,if=none,id=usb2.11,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb2.0,port=6,drive=usb2.11 \
-drive file=disk13,if=none,id=usb2.12,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb3.0,port=1,drive=usb2.12 \
-drive file=disk14,if=none,id=usb2.13,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb3.0,port=2,drive=usb2.13 \
-drive file=disk15,if=none,id=usb2.14,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb3.0,port=3,drive=usb2.14 \
-drive file=disk16,if=none,id=usb2.15,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb3.0,port=4,drive=usb2.15 \
-drive file=disk17,if=none,id=usb2.16,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb3.0,port=5,drive=usb2.16 \
-drive file=disk18,if=none,id=usb2.17,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb3.0,port=6,drive=usb2.17 \
-drive file=disk19,if=none,id=usb2.18,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb4.0,port=1,drive=usb2.18 \
-drive file=disk20,if=none,id=usb2.19,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb4.0,port=2,drive=usb2.19 \
-drive file=disk21,if=none,id=usb2.20,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb4.0,port=3,drive=usb2.20 \
-drive file=disk22,if=none,id=usb2.21,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb4.0,port=4,drive=usb2.21 \
-drive file=disk23,if=none,id=usb2.22,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb4.0,port=5,drive=usb2.22 \
-drive file=disk24,if=none,id=usb2.23,media=disk,cache=none,boot=off,snapshot=off,readonly=off,format=qcow2,aio=native \
-device usb-storage,bus=usb4.0,port=6,drive=usb2.23 \
-m 4096 \
-smp 2,cores=1,threads=1,sockets=2 \
-rtc base=localtime,clock=host,driftfix=slew \
-M rhel6.3.0 \
-boot order=cdn,once=c,menu=off   \
-enable-kvm \
-vnc :10 \
-monitor stdio

Comment 14 Gerd Hoffmann 2012-10-30 08:52:12 UTC
Hmm.  I see them all just fine.  Not all of them got a driver letter though because windows ran out of them (A: + B: = reservd for floppy, C: = hard disk, D: = cdrom, E: -> Z: assigned to 22 usb drives), so they are not visible in the windows explorer.  I see them in disk management though (control panel -> administrative tools -> computer management -> disk managment).

Please recheck.

Comment 22 Shaolong Hu 2012-11-29 02:15:27 UTC
Created attachment 653926 [details]
initial boot 23 disks

Comment 23 Shaolong Hu 2012-11-29 02:16:00 UTC
Created attachment 653927 [details]
after reboot 24 disks

Comment 26 Shaolong Hu 2012-11-30 02:28:24 UTC
OK, this bug is about windows seeing duplicate devices which is fixed, in device manager all 24 disks could be recognized, as to sometimes one disk can not be used (error: device cannot be start), open new one to track it:
Bug 882050 - Attach 24 usb-storage device to windows guest, sometimes after reboot one disk can not be used with error "device cannot start"

Set this bug verified.

Comment 28 errata-xmlrpc 2013-02-21 07:33:57 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.

http://rhn.redhat.com/errata/RHBA-2013-0527.html


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