Some advise with USB HDD passthrough over HDD passthrough

GenGT

Member
Jun 18, 2022
6
0
6
Hello everyone,

I have a home server running Proxmox 8.4.1 and I recently acquired a Terramaster D6-320 DAS, which I’ve passed through via USB to an OMV virtual machine. This type of DAS presents 6 HDDs independently, but they all appear with the same ID repeated 6 times, so I have to passthrough each port individually.

Inside the OMV VM, I use a partition system based on mergerfs + snapraid. This way, I avoid the issues ZFS has with this kind of device, and it’s a setup that works perfectly for me.

The problem arises when I try to perform a parity sync with snapraid — at that moment, the VM completely freezes, and the following error appears in the logs:

usb_packet_check_state: assertion `!"usb packet state check failed

So I assume the issue is related to USB passthrough and how the host handles it.

This problem doesn’t occur if I pass the disks directly to the VM — in that case, the sync completes without issues. However, using that method, I lose all SMART-related functionality. I also can’t passthrough the entire USB controller, since the host manages all ports through a single controller.

Could you advise me on what I could check or try to get this working properly via USB passthrough?

Thanks!
 
Can you share qm config VMIDHERE --current? I wonder if passing a separate USB 3.x HUB would work better.
but they all appear with the same ID
That might be related to the problem.
 
Last edited:
Can you share qm config VMIDHERE --current? I wonder if passing a separate USB 3.x HUB would work better.

That might be related to the problem.
Hello,

This is my qm config that works:

agent: 1
balloon: 2048
bios: seabios
boot: order=scsi0;net0
cores: 4
cpu: host
machine: q35,viommu=intel
memory: 4096
meta: creation-qemu=9.2.0,ctime=1753033619
name: OpenMediaVault
net0: virtio=BC:24:11:B6:9C:40,bridge=vmbr0,rate=100
numa: 0
ostype: l26
scsi0: local-zfs:vm-100-disk-0,backup=0,iothread=1,size=8G,ssd=1
scsi1: local-zfs:vm-100-disk-1,backup=0,iothread=1,size=10G,ssd=1
scsi2: /dev/disk/by-id/ata-ST4000VN006-3CW104_XXXX,backup=0,size=3907018584K
scsi3: /dev/disk/by-id/ata-ST4000VX015-3CU104_XXXX,backup=0,size=3907018584K
scsi4: /dev/disk/by-id/ata-ST4000VX016-3CV104_XXXX,backup=0,size=3907018584K
scsi5: /dev/disk/by-id/ata-ST4000VX016-3CV104_XXXX,backup=0,size=3907018584K
scsi6: /dev/disk/by-id/ata-ST4000VX016-3CV104_XXXX,backup=0,size=3907018584K
scsi7: /dev/disk/by-id/ata-WDC_WD40PURX-64GVNY0_WD-WCC4E3NXNT3C,backup=0,size=3907018584K
scsihw: virtio-scsi-single
smbios1: uuid=8d0f25c8-f746-4cc9-8984-6e9d1bbd9794
sockets: 1
vmgenid: e630db4a-51a8-4ba6-a1c7-3d0b5de595ed
If I try to passtrough with usb vendor/ID option all HDD are showed as unic ID and OMV only detects one drive at the same time.
1753434953378.png

If I passtrough with USB Port, I can pass all HDDs and seems that all is working fine, but the VM crash (shutdown) when snapraid parity sync begins. With parity sync, all data disk reads at the same time, and parity disk write.

1753435206437.png

I can't passtrough the pci usb controller, as all USBs are controlled by only one controller:
1753435419629.png
 
Hi,
I created an account just to share my experience, which unfortunately is very similar.
I have a Terramaster D4-320, and I'm passing through the USB ports to my OMV VM as well. At first it seems to work fine, but whenever I try sustained write or any heavy load (I'm using a 12 TB HDD and a 1 TB SSD btw), it breaks and the VM stops. It's not always exactly the same error, these are the ones that I've seen in the system log:
kernel: kvm[378327]: segfault at 100c ip 000058a5a1f5b110 sp 00007fff17473e20 error 4 in qemu-system-x86_64[58a5a1c73000+6ba000] likely on CPU 3 (core 3, socket 0)
(or similar)
QEMU[8966]: usb_packet_copy: invalid pid: 0
QEMU[1732]: kvm: ../hw/usb/core.c:563: usb_packet_check_state: Assertion `!"usb packet state check failed"' failed.
(the reason how I got here)

I've tried multiple physical ports, passing as USB device, passing as USB port, and even different hosts, but same thing.

My VM config:
Code:
agent: 1
bios: ovmf
boot: order=scsi0;net0
cores: 4
cpu: host
efidisk0: local-lvm:vm-401-disk-0,efitype=4m,size=528K
machine: q35
memory: 2048
meta: creation-qemu=9.2.0,ctime=1745193977
name: omv
net0: virtio=BC:24:11:E4:45:7F,bridge=vmbr20
net1: virtio=BC:24:11:62:AF:0E,bridge=vmbr1,mtu=1,tag=5
net2: virtio=BC:24:11:F4:33:69,bridge=vmbr1,mtu=1,tag=25
numa: 0
onboot: 1
ostype: l26
protection: 1
scsi0: local-lvm:vm-401-disk-1,discard=on,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=1d860610-6719-4696-9b8e-710e99a0643f
sockets: 1
startup: order=20
tags: nas
usb0: host=2-1.1
usb1: host=2-1.2
vmgenid: d439a37b-66a4-4882-ba66-a4c90b1139c7

I'm starting to think I should return it :(
 
Hi,
I created an account just to share my experience, which unfortunately is very similar.
I have a Terramaster D4-320, and I'm passing through the USB ports to my OMV VM as well. At first it seems to work fine, but whenever I try sustained write or any heavy load (I'm using a 12 TB HDD and a 1 TB SSD btw), it breaks and the VM stops. It's not always exactly the same error, these are the ones that I've seen in the system log:

(or similar)


(the reason how I got here)


I've tried multiple physical ports, passing as USB device, passing as USB port, and even different hosts, but same thing.

My VM config:
Code:
agent: 1
bios: ovmf
boot: order=scsi0;net0
cores: 4
cpu: host
efidisk0: local-lvm:vm-401-disk-0,efitype=4m,size=528K
machine: q35
memory: 2048
meta: creation-qemu=9.2.0,ctime=1745193977
name: omv
net0: virtio=BC:24:11:E4:45:7F,bridge=vmbr20
net1: virtio=BC:24:11:62:AF:0E,bridge=vmbr1,mtu=1,tag=5
net2: virtio=BC:24:11:F4:33:69,bridge=vmbr1,mtu=1,tag=25
numa: 0
onboot: 1
ostype: l26
protection: 1
scsi0: local-lvm:vm-401-disk-1,discard=on,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=1d860610-6719-4696-9b8e-710e99a0643f
sockets: 1
startup: order=20
tags: nas
usb0: host=2-1.1
usb1: host=2-1.2
vmgenid: d439a37b-66a4-4882-ba66-a4c90b1139c7

I'm starting to think I should return it :(
Try to passtrough the HDD and not the USB, for me it seems more stable:

qm set <VM_ID> -scsi<n> /dev/disk/by-id/<DISK_ID>

Like you can see on my vm conf.

I monitor the health of the disks using SMART data with the Scrutiny program, installing the hub in a Docker container on OMV and the collector on Proxmox.
 
Try to passtrough the HDD and not the USB, for me it seems more stable:



Like you can see on my vm conf.

I monitor the health of the disks using SMART data with the Scrutiny program, installing the hub in a Docker container on OMV and the collector on Proxmox.

Hey! I was about to update my comment, but I'll drop it here instead.
What I ended up doing was passing through the whole USB controller as a PCI device, I realized that luckily for me the USB type C port had its own controller (I thought it didn't). I'm happy to report that it's working rock solid now, with the downside that now it's not possible to passthrough individual drives to different VMs, which for my use case I'm okay with that.
Your alternative is what I was considering going for, definitely a great solution.

I appreciate your reply! And sorry for kinda taking advantage of your own thread:oops:
 
Last edited:
  • Like
Reactions: GenGT