Proxmox device passthrough

Proxmox’ PCI pass-through will allow the admin user to use a physical device such as integrated GPU (iGPU), graphics card unit (GPU), or network interface card (NIC) inside of the virtual machine. To support hardware pass-through, the CPU and the motherboard must support it. Fortunately, my Intel NUC 8th gen supports it.

Unfortunately, Proxmox IOMMU is not enabled by default. If you try to pass-through a PCI device, you will see a banner stating below and as shown in Figure 1.

No IOMMU detected, please activate it. See Documentation for further information.
Figure 1

To manually enable the IOMMU, we would need to access Proxmox’ CLI either via SSH or console.

Edit the /etc/default/grub using nano.

  1. Find the line GRUB_CMDLINE_LINUX_DEFAULT="quiet"
  2. Add intel_iommu=on after the word quiet as shown below
  3. Save the grub file

For AMD CPU, use amd_iommu=on.

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

Then update the grub via update-grub as shown below then reboot the system.

root@pve1:~# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.18-3-pve
Found initrd image: /boot/initrd.img-5.3.18-3-pve
Found linux image: /boot/vmlinuz-5.3.18-2-pve
Found initrd image: /boot/initrd.img-5.3.18-2-pve
Found linux image: /boot/vmlinuz-5.3.18-1-pve
Found initrd image: /boot/initrd.img-5.3.18-1-pve
Found linux image: /boot/vmlinuz-5.3.13-3-pve
Found initrd image: /boot/initrd.img-5.3.13-3-pve
Found linux image: /boot/vmlinuz-5.3.13-2-pve
Found initrd image: /boot/initrd.img-5.3.13-2-pve
Found linux image: /boot/vmlinuz-5.3.13-1-pve
Found initrd image: /boot/initrd.img-5.3.13-1-pve
Found linux image: /boot/vmlinuz-5.3.10-1-pve
Found initrd image: /boot/initrd.img-5.3.10-1-pve
Found linux image: /boot/vmlinuz-5.0.21-5-pve
Found initrd image: /boot/initrd.img-5.0.21-5-pve
Found linux image: /boot/vmlinuz-5.0.15-1-pve
Found initrd image: /boot/initrd.img-5.0.15-1-pve
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Adding boot menu entry for EFI firmware configuration
done
root@pve1:~# reboot

Once the system rebooted, login to the web UI. From here, when adding a PCI device, the “No IOMMU” banner is gone.

Figure 2

Select the integrated GPU (or GPU) from the Device drop-down menu and put a check make on All Function as shown in Figure 3. Also, the ROM-Bar is enabled by default, so make sure to disable the ROM-Bar; otherwise, the VM will not boot. The ROM-Bar option can be found by ticking the Advanced option.

Figure 3

About the Device‘s drop-down menu, mine is showing up some numbers that do not make any sense. Normally, you should see a description of what you are selecting from the drop-down menu. This is probably an Intel NUC thing. To make sense out of these number list, console-in or SSH-in to the PVE node and run the command lspci as shown in Figure 4.

As you can see in Figure 3, the number that I selected is 0000:00:02.0. Ignore the first four digit, and pay attention to the last five digits. The command lspci on PVE CLI shows the last five numbers and a description of what they are. In my case, 00:02.0 is the iGPU of Intel NUC 8th Gen as shown in Figure 4.

Figure 4

I hope you’ll this post helpful.

Cheers!

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x