Prevent usb detection Proxmox host

skylowe

Member
Dec 15, 2020
15
3
8
44
Hi.

So I have a usb hub that I want to pass throught to a vm. If I plug the hub in or reboot the host with it the host detects it and loads drivers and PREVENTS vm from starting.

Is there a way that I can blacklist this usb port / driver in host to prevent this scenario

Thanks
 
can you post the logs (journal/dmesg) + vm config (qm config ID) ?
note that you cannot pass through a usb-hub, do you mean a usb controller ?
 
I am passing through a whole controller 0b:00. But I need to prevent drivers from loading on host (I think - kinda like you do for GPU passthrough).

If something is plugged into this port when I try to load VM it fails. So I have to disconnect whatever is connected to this port/controller then start vm then replug. Then it works. But across host reboots I have to remember to disconnect devices from this port.
 
Last edited:
you would have to load the vfio-pci driver before the driver for the usb controller e.g

you can do this in /etc/modprobe.d as described in https://pve.proxmox.com/wiki/PCI(e)_Passthrough
e.g. options vfio-pci ids=1234:5678,4321:8765
and adding a 'softdep' option for that module so that it gets loaded before controller driver (see 'man modprobe.d' for details)