Bug 1376229

Summary: When more than 2 USB Redirections exist, USB 3 drives fails to be recognised by Windows 8.1
Product: [Fedora] Fedora Reporter: Louis van Dyk <louis>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: berrange, crobinso, louis, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-08 17:08:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Louis van Dyk 2016-09-15 00:05:41 UTC
Description of problem:
I originally logged bug 1253522 a year ago because USB 3 drives were not connecting to the Windows 8.1 guest.  I would get a yellow pop-up stating that: The last USB device you connected to this computer malfunctioned and Windows does not recognise it.  I was testing with my Western Digital USB 3 1 TB drive.

After hitting this wall again with my long-in-use VM, I created a test machine (uncovering other bugs along the way - like the virtio-win-118 netkvm driver issue), and as you said it worked out of the box.

Eventually, once I had a stable VM (using the "113" version of netkvm), I wanted to diff the two configurations, so was making the two configs identical.  What I noticed is that when MORE than TWO USB Redirections exist, the USB drives stop working.

Specifically, with USB Controller set to USB3:
1.  TWO USB Redirection SpiceVMC Devices in configuration:
a) All USB 3.0 and USB 2.0 redirected drives work as expected.

2.  THREE USB Redirection SpiceVMC Devices in configuration:
a) USB 2.0 Flash Drive 8GB detected and mounted.
b) Here's where the fun starts:
i.   If no USB devices have been redirected, then the first USB 3.0 device fails to mount, but the second one will mount.  It does not matter if the first USB 3.0 device is connected to a USB 2.0 or USB 3.0 host port.
ii.  If one USB device has been redirected , either as a failed USB 3.0 or a working USB 2.0, then the next USB 3.0 device connects and mounts.
iii. If two USB device has been redirected, then the next USB 3.0 device connects and mounts.

3.  FOUR USB Redirection SpiceVMC Devices in configuration:
a) USB 2.0 Flash Drive 8GB detected and mounted.
b) The situation for THREE drives repeats, except that you need to "busy out" two USB Redirections before the first USB 3.0 device will work.

My motherboard is an MSI MS-7756 which has 2 USB 3.0 ports at the back, and 2 chassis/case mounted USB 3.0 ports connected to the motherboard.  In other words, it supports 4 concurrent USB 3.0 ports (and another 6 USB 2.0 ports).

Looking at my testing, it seems that 
1.  the situation is the same if the USB 3.0 device is connected to a USB 2.0 or USB 3.0 host port, so it's the device itself, not the type of port being connected to.
2.  only TWO USB 3.0 devices are supported by the guest.
3.  the USB 3.0 ports are allocated to the LAST two available redirection "slots" - the first only support USB 2.0 devices, and only once two remain will any USB 3.0 devices be able to work.

What is interesting is that testing on Windows 7 (after installing the appropriate USB 3.0 controller driver from http://plugable.com/drivers/renesas) that with three Redirectors, it works starting with the first USB 3.0 device connected!  It did, however, only accept ONE USB 3.0 device.  On connection of a second, the guest locked up completely until the guest VM was no longer in a running state.  Nothing appears in the event log - this guest just freezes.  If only two Redirectors are define, the guest locks up with the first USB 3.0 device added.

But I am more concerned about Windows 8.1.


Version-Release number of selected component (if applicable):
libvirt-1.3.3.2-1.fc24.x86_64
qemu-2.6.1-1.fc24.x86_64
virt-manager-1.4.0-3.fc24.noarch


How reproducible:
Always

Steps to Reproduce:
1.  Create a Win8.1 64-bit guest with four USB Redirectors to Spice
2.  Mount a USB 3.0 drive.
3.

Actual results:
As described

Expected results:
The USB 3.0 drive should be mounted, regardless of the sequence.

Additional info:

Comment 1 Louis van Dyk 2016-12-12 22:35:14 UTC
Hi Cole

Any chance of you looking at this bug any time soon?

Thanks!!

Comment 2 Cole Robinson 2016-12-12 22:48:21 UTC
Sorry for the delay, I'm planning on doing a round up of fedora virt-manager bugs before the end of the year, I'll add this to the list

Comment 3 Cole Robinson 2016-12-21 23:35:16 UTC
Can you provide this for the non-working VM, with the devices attached:

- sudo virsh dumpxml $VM-NAME
- /var/log/libvirt/qemu/$VM-NAME.log

Comment 4 Cole Robinson 2017-01-16 13:55:36 UTC
Louis, please provide the info requested in Comment #3