brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: bind a GPU to vfio-pci in Tools > System Devices before you pass it through

Troubleshooting
~/tips/tip-unraid-bind-vfio-system-devices

Bind Selected to VFIO at Boot

Hide a GPU or controller from Unraid so a VM can use it directly.

Passing a graphics card or a USB controller to a VM on Unraid starts with hiding it from Unraid itself. The docs call that binding the device to the vfio-pci driver, and these days it’s a checkbox.

Go to Tools > System Devices. You get a list of every detected PCI device with its IOMMU group. Tick the device you want to give to a VM and click:

Bind Selected to VFIO at Boot

Then restart the server, because the binding only takes effect after a reboot. Devices that Unraid already uses, such as disk controllers and network cards, can’t be selected at all.

For a GPU there’s one detail people miss: the docs say to also select the associated sound device. Elsewhere they note that a sound card is required for HDMI audio via the GPU, so you want both in the VM. After the reboot both appear in the Other PCI Devices dropdown when you create or edit a VM.

If you still have the old VFIO-PCI Config plugin installed, uninstall it, since this is built into Unraid now. When something looks off after a reboot, the View VFIO-PCI Log button on the same page is where I’d look first. To start over, the docs say to delete /boot/config/vfio-pci.cfg and reboot. That resets all bindings at once, so I’d copy the file somewhere safe before deleting it.

The caveat is that binding your only GPU can leave Unraid unable to boot to its local GUI. And after you add or remove PCI cards, go back to System Devices, because a misbound device simply won’t show up for passthrough.

Further reading: Unraid docs: VM setup

More Troubleshooting tips Get-NetTCPConnection -State Listen modinfo -p usb_storage ps -o pid,lstart,etime,cmd -p 1234 sudo lsof -nP -p 1234 fc-match Helvetica All Troubleshooting tips (21) All topics

Link