As promised at the end of my last video, I’ve completed and uploaded “part 2” to passing through physical hardware to a VM on unRAID. The ways are:
1 – USB via the host
This works for simple USB devices such as mice, keyboards, flash drives etc… something which the unRAID host can recognise. This won’t work if you have to install a driver on the VM for the hardware (for instance a USB TV tuner).
2 – Editing the VM’s XML file
This is the next step-up from above, and allows you to pass through most PCI/PCIe hardware which is in it’s own IOMMU group. If the hardware is in an IOMMU group with other hardware, this won’t work. The VM again has to be off before you add the hardware.
One drawback here, apart from not supporting all hardware, is if the PCI order of the system changes (such as if you install a new card), the PCI bus number can change, and stop the XML entry working. Another downside is changes from the unRAID GUI can override the XML file, loosing your changes.
The text I use in the video is this:
<hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/> </source> </hostdev>
The values in red, green, and blue are taken from the PCI bus ref for the network card, like this:
0a:00.0 Ethernet controller : Intel Corporation 82574L Gigabit Network Connection [8086:10d3]
Don’t alter any other values. This is to be pasted into the VM’s XML, right before the final </devices> closing tag, like this:
<hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/> </source> </hostdev> </devices> </domain>
When you save the XML, unRAID will re-order the entries and correct any placement issues, so next time you open the XML it may look different. This is normal.
3 – Blacklisting on the host
This is the most complex of the 3 ways, and requires a reboot of the unRAID host every time you want to blacklist a device, but does offer the widest support for hardware. You edit the syslinux configuration of the unRAID host, adding the Vendor and Product ID of the hardware to an “vfio-pci” reference. Once done you can add the hardware to a VM via the GUI and install drivers within the VM itself. This is what works for my SCSI card. I’ve also used this method for USB controllers, and onboard sound.
For my example, the amended line in the syslinux configuration is this:
append iommu=pt vfio-pci.ids=1000:0030 initrd=/bzroot
The text in bold is the new addition, and the references in red and green taken from the Vendor and Hardware ID, like this:
03:08.0 SCSI storage controller : LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI [1000:0030]
The drawback is you have to reboot the unRAID host after making the change.
I cover all 3 methods in my video which you can watch here:
Using method 3, I got my SCSI card and LTO drive working, and was able to switch off my physical backup server. Yay!
Thanks and further reading
I did a massive amount of research while creating this video, mainly because I’m using to solve a real-world problem for me. Most of my research came direct from Lime Tech’s forums, starting with this post:
If you’re looking for a place to start, start here!
I also found the following useful:
And because someone will ask – I got the drivers for the SCSI card by reading this post:
On the whole, the video took around 100 hours of research and creation, it was worth it for me, I hope you find it useful!