VM USB Passthrough unplug and replug not working

OverEngineer

Cadet
Joined
Dec 25, 2023
Messages
6
Hey, i am using usb device passthrough to a vm with controller-type qemu-xhci, today i tried unplugging and replugging the usb and it was not passed into the VM on replug, is this expected behavior?
Can this somehow be done?
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
Hey, i am using usb device passthrough to a vm with controller-type qemu-xhci, today i tried unplugging and replugging the usb and it was not passed into the VM on replug, is this expected behavior?
Can this somehow be done?
I don't think TrueNAS VMs support hot plugging USB.

FWIW, I hit a similar issue running Home Assistant OS, where one of the add-ons resets a connected USB device. This causes the device to eject from the VM and never reattach unless I restart the VM.

I think a workaround is to use PCIe passthrough for the entire USB controller that your device is connected to.
 

OverEngineer

Cadet
Joined
Dec 25, 2023
Messages
6
I don't think TrueNAS VMs support hot plugging USB.

FWIW, I hit a similar issue running Home Assistant OS, where one of the add-ons resets a connected USB device. This causes the device to eject from the VM and never reattach unless I restart the VM.

I think a workaround is to use PCIe passthrough for the entire USB controller that your device is connected to.
Thanks for your answer, sadly i cannot do PCI passthhrough atm.

Imho is this behavior just wrong, USBs are sort-of hot pluggable devices and usb passthrough should just work correctly on replugging.

I hope someone else can answer/solve this problem. I hope there is a way to get this to work correctly, eventually with another controller-type..
 
Joined
Jun 2, 2019
Messages
591
+1 Proxmox supports USB device passthru

TrueNAS is a NAS appliance first.
Proxmox is a type 1 hypervisor first.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Imho is this behavior just wrong, USBs are sort-of hot pluggable devices and usb passthrough should just work correctly on replugging.
That's precisely what makes USB difficult for this use case. There's just no great general solution and too many ways to make this break in weird and wonderful ways.
 

OverEngineer

Cadet
Joined
Dec 25, 2023
Messages
6
That's precisely what makes USB difficult for this use case. There's just no great general solution and too many ways to make this break in weird and wonderful ways.
Should i create a bug somewhere because imho this is clearly a bug.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You can try, but it's not likely to get traction between the high complexity and low return of the work involved...
 
Top