Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1046873 - fail to be recognized the hotpluging usb-storage device with xhci controller in win2012R2 guest
fail to be recognized the hotpluging usb-storage device with xhci controller ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-27 03:06 EST by Sibiao Luo
Modified: 2015-03-05 03:03 EST (History)
13 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-76.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 03:03:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The usb device not recongnized in guest. (87.86 KB, image/png)
2013-12-27 03:08 EST, Sibiao Luo
no flags Details
Unknown USB Device (Port Reset Failed). (88.67 KB, image/png)
2013-12-27 03:09 EST, Sibiao Luo
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0349 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2015-03-05 07:27:34 EST

  None (edit)
Description Sibiao Luo 2013-12-27 03:06:47 EST
Description of problem:
boot win2012R2 guest with xhci controller and then hotplug a usb-storage with xhci controller to guest, but it fail to be recognized and can't work at all in guest.
BTW, if just specify the usb-storage device with xhci controller to win2012R2 guest in qemu-command line directly, it can be recognized and work well in win2012R2 guest.

Version-Release number of selected component (if applicable):
host info:
3.10.0-64.el7.x86_64
qemu-kvm-1.5.3-30.el7.x86_64
seabios-1.7.2.2-6.el7.x86_64
guest info:
win2012R2
virtio-win-prewhql-0.1-74 

How reproducible:
100%

Steps to Reproduce:
1.boot win2012R2 guest with xhci controller.
e.g:# /usr/libexec/qemu-kvm -M pc...-device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7
2.hotplug a usb-storage device with xhci controller to guest.
{ "execute": "__com.redhat_drive_add", "arguments": { "id": "drive-storage1", "file": "/home/my-usb-storage.raw", "media": "disk", "cache": "none", "format": "raw" } }
{"return": {}}
{ "execute": "device_add", "arguments": { "driver": "usb-storage", "drive": "drive-storage1", "bus": "xhci0.0", "id": "storage1" } }
{"return": {}}
{ "execute": "query-block"}
{"return": [...{"io-status": "ok", "device": "drive-storage1", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "image": {"virtual-size": 10737418240, "filename": "/home/my-usb-storage.raw", "format": "raw", "actual-size": 147554304}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "raw", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/my-usb-storage.raw", "encryption_key_missing": false}, "type": "unknown"}]}
3.check the usb-storage device in guest.

Actual results:
after step 3, it fail to be recognized and can't work at all in guest.
I will attach the screen shot for it.

Expected results:
It should be recognized and work correctly.

Additional info:
# /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge,hv_spinlocks=0x1fff,hv_relaxed,hv_vapic -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/en_windows_server_2012_r2_x64.raw,if=none,id=drive-virtio-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:01:02:03:04:05,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -vga qxl -monitor stdio -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7
Comment 1 Sibiao Luo 2013-12-27 03:08:00 EST
Created attachment 842215 [details]
The usb device not recongnized in guest.
Comment 2 Sibiao Luo 2013-12-27 03:09:38 EST
Created attachment 842216 [details]
Unknown USB Device (Port Reset Failed).
Comment 3 Jun Li 2014-01-07 01:54:03 EST
Boot with usb3.0, win2008sp2-32 guest hit this issue, too. Seabios can find usb3.0 device, but inside guest can not find it.

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-31.el7.x86_64
3.10.0-65.el7.x86_64
---
<cli>:
# /usr/libexec/qemu-kvm -S -M pc-i440fx-rhel7.0.0 -cpu SandyBridge,hv_spinlocks=0x1fff,hv_relaxed,hv_vapic -enable-kvm -m 4G -smp 4,sockets=4,cores=1,threads=1 -name juli -uuid 355a2475-4e03-4cdd-bf7b-5d6a59edaa68 -rtc base=localtime,clock=host,driftfix=slew -drive file=iscsi://10.66.4.204:3260/iqn.2014-01.com.example:juli/1,if=none,id=drive-virtio0-0-0,media=disk,werror=stop,rerror=stop,cache=none,format=qcow2  -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio0-0-0,id=virtio0-0-0,bootindex=0 -drive file=/home/juli/ISO/en_windows_server_2008_datacenter_enterprise_standard_sp2_x86_dvd_342333.iso,if=none,media=cdrom,format=raw,aio=native,id=drive-ide1-0-0 -device ide-drive,drive=drive-ide1-0-0,id=ide1-0-0,bus=ide.0,unit=1,bootindex=4 -drive file=/home/juli/virtio-win-prewhql-0.1-74.iso,if=none,media=cdrom,format=raw,aio=native,id=drive-ide1-0-1 -device ide-drive,drive=drive-ide1-0-1,id=ide1-0-1,bus=ide.1,unit=0,bootindex=6 -device virtio-balloon-pci,id=ballooning -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -k en-us -boot menu=on,reboot-timeout=-1,strict=on -qmp tcp:0:4488,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :6 -spice port=5969,disable-ticketing -vga qxl -global qxl-vga.revision=3 -monitor stdio -monitor tcp:0:7788,server,nowait -monitor unix:/tmp/monitor1,server,nowait -netdev tap,id=tap1,vhost=on,queues=4,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,ifname=tap-juli -device virtio-net-pci,netdev=tap1,id=nic1,mq=off,vectors=17,mac=1a:59:0a:4b:ab:94 -device usb-ehci,id=xhci -drive file=iscsi://10.66.4.204:3260/iqn.2014-01.com.example:juli/2,if=none,id=storage0,media=disk,cache=none,format=qcow2 -device usb-storage,drive=storage0,bus=xhci.0 -drive file=iscsi://10.66.4.204:3260/iqn.2014-01.com.example:juli/3,if=none,id=storage1,media=disk,cache=none,format=qcow2 -device usb-storage,drive=storage1,bus=xhci.0
Comment 4 Gerd Hoffmann 2014-01-16 02:51:04 EST
Hmm, sounds like a 949514 dup, but as that one is long fixed it must be something else.

Re comment #3: win2k8 (out-of-the-box) not seeing usb3 devices is normal, it doesn't ship with xhci drivers.  Can possibly made work by downloading and installing drivers manually, but that isn't supported (only drivers shipped with the os or by redhat) so no need to test that case.
Comment 5 Jun Li 2014-02-18 01:08:43 EST
win2003sp2 - 64 hit this issue, too. Inside guest can not find usb 3.0.
----------
Version of qemu-kvm:
qemu-kvm-rhev-1.5.3-47.el7.x86_64
3.10.0-86.el7.x86_64
-------------
# /usr/libexec/qemu-kvm -M pc -m 4G -smp 4 -boot menu=on,reboot-timeout=-1,strict=on -monitor stdio -spice port=5933,disable-ticketing -vga qxl -qmp tcp::6666,server,nowait -drive file=gluster://10.66.6.82:24007/gv0/win2003sp2-64.raw,if=none,format=raw,id=disk,cache=none,rerror=stop,werror=stop,serial="QEMU-DISK1",aio=native -device virtio-blk-pci,drive=disk,id=sys_disk,scsi=off,serial=xxxx,config-wce=off  -netdev tap,id=tap1,vhost=on,queues=4,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown -device  virtio-net-pci,mq=on,vectors=17,netdev=tap1,id=net1,mac=24:be:05:0c:22:22 -drive file=/home/juli/virtio-win-prewhql-0.1-74.iso,if=none,media=cdrom,id=cdrom -device ide-cd,bus=ide.0,unit=0,drive=cdrom,id=sys-cdrom \
-device nec-usb-xhci,id=xhci0 \
-drive file=gluster://10.66.6.82:24007/gv0/tt-li.raw,if=none,id=drive-usb-0-1,media=disk,format=raw,cache=none,aio=native \
-device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on
------------------
Comment 7 Gerd Hoffmann 2014-07-04 07:40:31 EDT
Please retest with this test build:
http://people.redhat.com/ghoffman/bz1103193/
Comment 9 Miroslav Rezanina 2014-10-21 10:52:20 EDT
Fix included in qemu-kvm-1.5.3-76.el7
Comment 11 Jun Li 2014-11-06 02:44:44 EST
Reproduce:

Version of components:
qemu-kvm-1.5.3-68.el7.x86_64

cli:
# /usr/libexec/qemu-kvm -M pc -m 2G -smp 2 -drive file=/mnt/windows_img/win2012-64r2.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial="QEMU-DISK1",snapshot=on -device ide-drive,bus=ide.0,drive=drive-system-disk,id=system-disk,bootindex=1 -device nec-usb-xhci,id=xhci0,bus=pci.0,addr=0x7 -monitor stdio -qmp tcp::8888,server,nowait -spice disable-ticketing,port=5931

steps as comment 0, after step 3, it fail to be recognized and can't work at all in guest.

As above show, this bz has been reproduced.
------------
Verify:

Version of components:
qemu-kvm-1.5.3-77.el7.x86_64

cli and steps the same as above show, after step 3, can find the usb storage correctly. cp file into this usb storage and check the md5 are the same inside guest.

Based on above show, this bz has been verified.
-------------
BTW, also test with qemu-kvm-rhev-2.1.2-6.el7.x86_64 works well, too.
Comment 14 errata-xmlrpc 2015-03-05 03:03:25 EST
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/RHSA-2015-0349.html

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