Pass Through of USB Storage Adapters Not Working
-
@DustinB Sure, here we go:
USB Mass Storage Device VLI Manufacture String-VLI Product String-ABCDEFA74602 VIA Labs, Inc. [0x2109] VL817 SATA Adaptor [0x0715] Super Speed - USB 3.0 [5Gb/s], Port: 1, Address: 4, Revision: 0x0000 USB\VID_2109&PID_0715\ABCDEFA74602 USB Mass Storage Device F:\ - VLI Manufacture String-VLI Product String-ABCDEFA74566 VIA Labs, Inc. [0x2109] VL817 SATA Adaptor [0x0715] Super Speed - USB 3.0 [5Gb/s], Port: 1, Address: 4, Revision: 0x0148 USB\VID_2109&PID_0715\ABCDEFA74566 USB Mass Storage Device F:\ - JMicron-External USB 3.0-201703310007F JMicron Technology [0x152D] External Disk 3.0 [0x0578] Super Speed - USB 3.0 [5Gb/s], Port: 1, Address: 4, Revision: 0x0204 USB\VID_152D&PID_0578\201703310007F USB Mass Storage Device F:\ - General-USB to SATA/PCIe Bridge-0123456789ABCDEF JMicron Technology [0x152D] 0x0581 Super Speed - USB 3.0 [5Gb/s], Port: 1, Address: 4, Revision: 0x4204 USB\VID_152D&PID_0581\0123456789ABCDEF
-
It looks like I'm not the only one with this issue. Someone on Reddit is having the same problem.
https://www.reddit.com/r/xcpng/comments/1getxr8/xcpng_83_cant_add_usb_drive_to_vm/
Just for fun, I tried passing through my devices in VMware, it seems to work there.
-
Probably related to USB3 only device? IIRC, there's a discussion somewhere internally about getting USB3 exposed for USB passthrough (ping @stormi and @andriy.sultanov )
-
@olivierlambert The only discussion about USB3 that I'm aware of is about making USB3 passthrough faster (https://github.com/xapi-project/xen-api/issues/6389). Not being able to see them in the guest OS at all would indicate a different issue...
-
@olivierlambert The enclosure works fine on an old computer with only USB 2. I'm not sure I understand what you mean.
-
I was just thinking about the potential reasons why it doesn't work, and it wasn't a correct guess
-
@stormi @andriy.sultanov @olivierlambert
I can confirm the issue for Windows 10 Guest on XCP-Ng 8.3 (Latest updates installed)
Testing Procedure & Findings:
If the drive enclosure is plugged into USB3 port (USB 3.2), then Windows 10 does not recognize the SSD. If the same enclosure is plugged into USB2 port, then Windows 10 can recognize the drive.XCP-Ng shows the device in XO as USB 3.2 and also creates a vUSB 3.2 for the Guest. But the guest itself does not recognize this.
Also tested the enclosure on another PC directly running Windows 10 and the enclosure seems to work fine there.
Hardware Used:
RTL9210B-CG based SSD Enclosure (USB 3.2) -
Could it be that the drive is not getting detected due to some speed mismatch (backward compatibility while negotiating connection) ?
^
This is just a guess -
All, I have never been able to successfully pass through a USB 3.x storage device (like a USB hard drive) to an XCP-ng 8.2/8.3 Windows VM. However, USB 2.0 devices such as a license dongle; that works. I, for one, would love to see this get fixed. FWIW, yet another "me too."
-
@XCP-ng-JustGreat
I add my passthrough disks this way so I can attach them to my vm in xo ce. And also USB 3.1 an 3.2.on the host:
find your disk. .. fdisk ok lsblksudo mkdir -p /srv/pass_drives
xe sr-create name-label=Pass_Drives type=udev content-type=disk device-config:location=/srv/pass_drives
sudo ln -sf /dev/disk/by-id/usb-Seagate_Desktop_NA7HMMDC-0:0 /srv/pass_drives/sdgscan ...
after that you can attach it in you (down) vm and startup.I have 4 disks in passthrough configuration this way (2 x 8TB sata for truenas vm in a mirror conf, 1 TB sata and 1 x USB 8TB for external backup) and as long as you don't change the /dev/sdX order it works fine.
xcp-ng 8.3
-
@JanP Thanks for the nice cookbook! I set up the passthrough SR per your instructions and then added the VUSB to the VM and started it up. As before, when I attach the disk to a USB 2.x port, I see it and it works. However, when I then plug it into a USB 3.x port and recreate the VUSB on the shutdown VM, it correctly shows USB 3.x with 10000 speed, but my Windows 11 VM does not see it. The Windows device manager shows that there is no USB 3.x device controller, only USB 2.0. Is there a way to force the emulated USB device in the VM definition to be USB 3.x? If Windows finds a USB 3.x device, it will autoconfigure it. Unfortunately, it doesn't appear to find a USB 3.x device. Just for fun, I'm running my test on a tiny Beelink EQ13 PC with Intel N100/4C,16GB/500GB SSD/2x1Gb Realtek NICs that runs XCP-ng 8.3 with 2xVMs: XOS and Windows 11 24H2. It's a $189 box I acquired in July of 2024 and I've been having a blast bending it like Gumby for different uses.
-
I only use the passthrough part of disks, not controllers. VUSB part in xo i don't use. I think that's a completely different approach. Maybe you could check your drivers and manager. There is a cleaner somewhere, don't know the link, to remove the old drivers in windows with powershell and after that install the xen drivers XenServer VM Tools for Windows 9.4.1. I got it from here: https://www.xenserver.com/downloads
https://github.com/xcp-ng/win-pv-drivers/releases/download/v9.0.9065/XenClean.zip
docs:
https://docs.xcp-ng.org/vms/#fully-removing-xen-pv-drivers-with-xenclean