Can't pcie passthrough my NIC (iommu group)

When trying to passthrough my NIC in a vm i get this error:

”Not a valid choice. The PCI device is not available for passthru: Unable to determine iommu group”

System Info:

TrueNAS Scale version: 25.10.4 - Goldeye

hardware
ryzen 7 5700x
asrock b550 pg riptide (default bios settings, except making sure virtualization is enabled. I also did not update the bios when i bought it last year so idk if that matters)

16gb ddr4 corsair lpx vengeance

no gpu

1 nvme

4x hard drives in raid z2

The NIC im trying to use is the “RL-I226V-RJ45*2” from “Rielincard”
I am having issues with the NIC that may or may not be related to my current issue is where the either of the two ports on the NIC wont have link lights or detect them being connected to anything.
i dont have that issue on my windows desktop or my nixos linux desktop they just work straight out the box. I’ve tried using two differnt pcie slots, but i don’t need this issue resolved unless it helps with the pice passthrough

Seems a no-name clone of a genuine Intel NIC. It’s possible this is a counterfeit card.

I struggled with passing through an NVMe … turned out to be user error. Steps described here: Cannot pass NVMe to VM in TrueNAS 26: User error or bug? - #4 by yorick

my /sys/kernel/iommu_groups/ is empty

Check your BIOS settings. On some Ryzen systems, IOMMU in the BIOS defaults to off.

Make sure IOMMU is enabled in BIOS. Then to get a nice human readable output of your IOMMU device groups

for d in $(find /sys/kernel/iommu_groups/ -type l | sort -V); do 
    echo "IOMMU Group ${d##*/}: $(lspci -nns ${d##*/})"
done

After enabling the settings you guys shared I can now pass through my NIC, thank you all for your help!

3 Likes

well i can give my vm the device now but when i try to start it i get this error:
```
Error Name: EFAULT
Error Code: 14
Reason: [EFAULT] internal error: QEMU unexpectedly closed the monitor (vm=‘10_OPNsense’): 2026-06-21T00:56:26.263830Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:06:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x7”}: vfio 0000:06:00.0: group 0 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.
Error Class: CallError
Trace: Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py”, line 191, in start
if self.domain.create() < 0:
^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/libvirt.py”, line 1373, in create
raise libvirtError(‘virDomainCreate() failed’)
libvirt.libvirtError: internal error: QEMU unexpectedly closed the monitor (vm=‘10_OPNsense’): 2026-06-21T00:56:26.263830Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:06:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x7”}: vfio 0000:06:00.0: group 0 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py”, line 361, in process_method_call
result = await method.call(app, id_, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py”, line 57, in call
result = await self.middleware.call_with_audit(self.name, self.serviceobj, methodobj, params, app,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 956, in call_with_audit
result = await self._call(method, serviceobj, methodobj, params, app=app,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 773, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py”, line 108, in wrapped
result = await func(*args)
^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_lifecycle.py”, line 57, in start
await self.middleware.run_in_thread(self._start, vm[‘name’])
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 670, in run_in_thread
return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 667, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_supervisor.py”, line 68, in _start
self.vms[vm_name].start(vm_data=self._vm_from_name(vm_name))
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py”, line 201, in start
raise CallError(‘\n’.join(errors))
middlewared.service_exception.CallError: [EFAULT] internal error: QEMU unexpectedly closed the monitor (vm=‘10_OPNsense’): 2026-06-21T00:56:26.263830Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:06:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x7”}: vfio 0000:06:00.0: group 0 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.
```

That’s because TrueNAS doesn’t include the vfio-pci module in its initramfs. Try running this from shell: midclt call system.advanced.update '{ "kernel_extra_options": "modules_load=vfio-pci vfio-pci.ids=XXXX:XXXX" }', where XXXX:XXXX is the PCI vendor:device ID of your NIC, as shown in lspci -nn. Reboot to make the kernel options active. Once the system returns, run lsmod to ensure the vfio-pci module loaded, and check dmesg to verify it masked off your NIC and its IOMMU group.

Also, look at @Dopamin3’s post #6 in this thread. If there are other PCI IDs in the same IOMMU group, you’ll need to include their vendor:device IDs, comma separated, in the vfio-pci.ids parameter above.

Really? I have been passing through devices to VMs since the advent of SCALE. Without any kernel option shenanigans.

Did you pass through any NICs that can do SR-IOV? This NIC apparently can, and QEMU wants vfio-pci to resolve the ambiguity in passthrough methodologies.

1 Like

Honestly, no.

I followed this and still had the same issue, so I tried using claude to see if it could help it said my devices all being in the same IOMMU group is a issue or something, so it guided me through adding acs “pcie_acs_override=downstream”, now there is multiple groups but it said the group that had my NIC also included my motherboards NIC and some other device which is an issue for my use case. Thats as far as ill let it take me.

The acs override doesnt work on Truenas afaik.