How to setup proxmox with PCIe / GPU passthrough to guest

Before we start, let us summarize for what we need the PICe or GPU passthrough. The reading time will be 3-5 minutes. Implementation time will be about 30 minutes (assuming fast SSDs for guest VM and enough RAM on proxmax).

Assume you have a GPU which you want use as accelerator in your guest OS. E.g. for acceleration with applications like

  • Blackmagic Davinci Resolve Studio
  • Adobe After Effects CC
  • Adobe Premiere CC
  • Adobe Photoshop CC
  • Blender
  • 3ds Max
  • AutoCAD
  • CATIA
  • Cinema 4D
  • LightWave
  • Maya
  • Mudbox
  • SolidWorks
  • ZBrush

And you want to use a GPU like

  • nvidia GeForce
  • nvidia Quadro
  • nvidia Tesla
  • AMD Radeon
  • AMD Radeon Pro
  • AMD Radeon Instinct

Requirements for the passthrough

You will need an hardware environment with following technologies

  • a virtualization environment like proxmox 😉
  • virtualization technology support on CPU for privileged accesses from host and virtual guests to the CPUs
  • IO-MMU support for the passthrough of PCIe devices.

Virtualization technology VT-x & AMD-V

You need to buy a CPU with intel’s Virtualization Technology (VT) formerly known as Vanderpool Technology and marketed as VT-x or a AMD CPU with AMD-V support. The first CPUs here have been end of 2005:

  • intel Pentium 4 model 662 und 672
  • intel Itanium
  • AMD Athlon 64
  • AMD Athlon 64 X2
  • AMD Athlon 64 FX

But honestly I would not use them in the year 2021/2022 😉 and also they had many bugs here too. Intels product politics is somehow really bad in terms how the support and not support VT in CPUs. Intel is also today not supporting VT on all CPUs. So you should always check your CPU on intel’s ARK page.

Intel and AMD invented some more advanced technologies.

Virtualization IO-MMU VT-d & AMD-Vi

This technology is required to be able to access IO’s of devices directly from the virtualized guests. It is known as intel VT-d and AMD-Vi

UEFI is also required

Even if IO-MMU and VT could be supported by a BIOS it is highly recommended to use UEFI. In UEFI the support has to be implemented by the means of the requirements of the CPU vendors. On the BIOS only, the board vendor can decide on his own, and sadly the decisions are mostly undocumented on the BIOS side. So the BIOS is too unreliable for a clean decision.

What CPUs to use?

To be on the save side you shall use only intel CPUs from Haswell or later, this are

  • core i gen 4
  • Xeon E3 v3
  • Xeon E5 v3
  • Xeon E7 v3

Or AMD’s Barcelone line CPUs or later, this are

  • AMD Opteron CPUs from 0x10 Barcelona Line
  • AMD Phenom II

Enabling proxmox for GPU passthrough as accelerator

Here you will learn how to passthrough a GPU to the guest to use the GPU as a passthrough device. This is not explaining how to use the passthrough-GPU as primary display to use the GPU as primary video display device.

First a recheck:

  • right CPU available on your proxmox server?
  • UEFI support enabled on board BIOS?
  • VT and IO-MMU enabled in board BIOS?

Great now we can go on.

The next steps will be:

  • enable the kernel with the corresponding virtualization features
  • enable the proper kernel modules
  • configure IOMMU
  • blacklisting for the PCIe / GPU drivers to avoid autoloading them into proxmox, since they need to be exclusively used in our virtualized guest
  • configure our virtualized guest VM
  • configure our virutalized guest OS Windows 10/11
  • optionally make the GPU as primary device (mostly not needed for off-loading CPU with specialized GPU functions)

Enabling the kernel features

 

 

Outlook for future versions

Intel has implemented GVT-d, GVT-g, GVT-s in 2014 for the Iris Pro GPU, which allows the virtual host to share the GPU to multiple virtualized guest. So it is only a matter of time to be able to use easily also GPUs in virtual guest, like we are used to do with CPUs and Memory.

Leave a Comment

Your email address will not be published. Required fields are marked *