UTM icon indicating copy to clipboard operation
UTM copied to clipboard

Cannot attach 4TB external Sandisk SSD

Open gus4rs opened this issue 2 years ago • 6 comments

Describe the issue
Trying to attach an 4TB external Sandisk SSD to a Fedora Linux 37 guest, but it doesn't work. The device is associated in the top menu but it's impossible to read it from the VM. USB compatibility is set to 3.1 in the config (the highest).

Screenshot 2023-03-28 at 15 45 33

Configuration

  • UTM Version: 4.1.6
  • macOS Version: Ventura 13.2.1
  • Mac Chip: Apple M2 Max

Debug log
dmesg outputs this:

[  521.085331] usb 5-3: new high-speed USB device number 15 using xhci_hcd
[  521.208732] usb 5-3: device descriptor read/64, error 18
[  521.435159] usb 5-3: device descriptor read/64, error 18
[  521.537879] usb usb5-port3: attempt power cycle
[  521.723549] usb 5-3: new high-speed USB device number 16 using xhci_hcd
[  521.739604] usb 5-3: Invalid ep0 maxpacket: 9
[  521.859194] usb 5-3: new high-speed USB device number 17 using xhci_hcd
[  521.874996] usb 5-3: Invalid ep0 maxpacket: 9
[  521.875632] usb usb5-port3: unable to enumerate USB device

gus4rs avatar Mar 28 '23 14:03 gus4rs

Same here.

Using UTM 4.2.5 on macOS Ventura 13.3 on MBP M1 late 2021 with Ubuntu 22.04 guest. I use a Samsung T7 external 2TB HDD (the small credit card sized blue one).

But no drive shows up in Ubuntu. ls -al /dev/sd* only shows the local virtual HDD images (sdaX).

Screenshot 2023-04-29 at 19 11 21 Screenshot 2023-04-29 at 19 10 55

freebrowser1 avatar Apr 29 '23 17:04 freebrowser1

So this is indeed a bug? I simply cannot read an SSD disk from the guest virtual machine or is there a workaround?

gus4rs avatar May 25 '23 14:05 gus4rs

I just tested in UTM 4.2.5 and the problem still persists. Also as suggested in another issue I captured the output of a test usb program:

$ ./testlibusb
Dev (bus 0, device 2): 0781 - 55AF speed: 10G
  Manufacturer:              SanDisk
  Product:                   Extreme Pro 55AF 

gus4rs avatar May 25 '23 15:05 gus4rs

same problem connecting Samsung T7 PSSD

kernal: usb 3-3: new high-speed USB device number 2 using xhci_hcd
kernel: usb 3-3: device descriptor read/64, error 18
kernel: usb 3-3: device descriptor read/64, error 18
kernel: usb 3-3: new high-speed USB device number 3 using xhci_hcd
kernel: usb 3-3: device descriptor read/64, error 18
kernel: usb 3-3: device descriptor read/64, error 18
kernel: usb usb3-port3: attempt power cycle
kernel: usb 3-3: new high-speed USB device number 4 using xhci_hcd
kernel: usb 3-3: Invalid ep0 maxpacket: 9
kernel: usb 3-3: new high-speed USB device number 5 using xhci_hcd
kernel: usb 3-3: Invalid ep0 maxpacket: 9
kernel: usb usb3-port3: unable to enumerate USB device

mx1up avatar Aug 04 '23 22:08 mx1up

seems to be duplicate of #3995

workaround is going through a USB hub

mx1up avatar Aug 04 '23 23:08 mx1up

I'm still having the same problem on 4.5.3 (99) with a 4TB SanDisk Extreme Portable SSD. The USB workaround isn't working unfortunately.

Screenshot 2024-07-26 alle 10 16 53

Here you can find the log output of the Windows VM, on Archlinux the drive is not even detected by the kernel although in that case no UTM error window appears. Other USB SSDs seem to work though.

giovariot avatar Jul 26 '24 08:07 giovariot

The problem persists on 4.6.2 The USB workaround is still not working.

Here is the dmesg output from current Archlinux

[   71.434364] usb 3-3: new high-speed USB device number 2 using xhci_hcd
[   71.560304] usb 3-3: Invalid ep0 maxpacket: 9
[   71.674291] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[   71.800302] usb 3-3: Invalid ep0 maxpacket: 9
[   71.800710] usb usb3-port3: attempt power cycle
[   71.978258] usb 3-3: new high-speed USB device number 4 using xhci_hcd
[   71.990438] usb 3-3: Invalid ep0 maxpacket: 9
[   72.104273] usb 3-3: new high-speed USB device number 5 using xhci_hcd
[   72.116453] usb 3-3: Invalid ep0 maxpacket: 9
[   72.116598] usb usb3-port3: unable to enumerate USB device

Has anyone tried using such drives on a pure qemu environment? If that still persists upstream we might send a bug report directly to the qemu project here: https://gitlab.com/qemu-project/qemu/-/issues

I'm sorry I created a duplicate of this same issue on #6721. Also #6291 and #6764 are probably duplicates. And also #3995 was probably the first issue reporting the problem.

giovariot avatar Nov 29 '24 19:11 giovariot

could it be due to the USB issue that has been raised here as well (it has been closed but unfortunately still unresolved as of v4.5.2) https://github.com/utmapp/UTM/issues/3975

kristof-dragon avatar Mar 18 '25 14:03 kristof-dragon

Is this a UTM problem or a mainline qemu one? Is there any way to know?

giovariot avatar Apr 08 '25 17:04 giovariot

Tried running standalone qemu with the following command

sudo qemu-system-aarch64 -machine virt -m 4G -bios edk2-aarch64-code.fd -accel hvf -cdrom mini.iso -hda disk.qcow2 -device intel-hda -device nec-usb-xhci,id=usb-bus -device usb-tablet,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 -device qemu-xhci,id=usb-controller-0 -cpu host -boot menu=on -device virtio-gpu -device usb-host,vendorid=0x174c,productid=0x2362

But the only output I get is:

qemu-system-aarch64: libusb_kernel_driver_active: -5 [NOT_FOUND]

Does anyone know any workaround around this so I can try if the behavior is the same on standalone qemu?

giovariot avatar Apr 14 '25 21:04 giovariot