GPU passthrough proxmox tutorial step by step for virtual…
Virtualization platforms require direct hardware access to achieve native rendering performance for graphics-intensive guest operating systems. When administrators deploy dedicated hardware to virtual guests, they eliminate hypervisor display bottlenecks. According to the Proxmox VE Administration Guide, system administrators can assign physical PCIe hardware directly to a virtual machine using IOMMU grouping and VFIO kernel drivers. This configuration enables workloads such as machine learning training, video transcoding, and 3D rendering to execute efficiently inside a Proxmox virtual environment. Implementing this procedure requires strict attention to platform firmware flags, host-driver isolation, and guest operating system configurations.
System Prerequisites and Hardware Requirements
Executing a successful device assignment workflow depends on underlying motherboard and processor capabilities. Both Intel VT-d and AMD-Vi technologies must be present and active within the host platform. Motherboard firmware needs proper initialization parameters to isolate individual peripheral component interconnect slots into distinct memory management units. Without proper IOMMU group isolation, hardware sharing conflicts prevent the hypervisor from passing the graphics card to a single guest. Administrators should review the official Proxmox NVIDIA vGPU documentation to verify supported driver lineages and platform configurations before proceeding.
Enabling IOMMU in Motherboard UEFI Firmware
Before configuring the hypervisor operating system, administrators must modify the system BIOS or UEFI settings. Access the motherboard firmware utility during system boot and locate the virtualization parameters. Enable Intel Virtualization Technology for Directed I/O or AMD IOMMU depending on the installed processor architecture. Additionally, enable Above 4G Decoding to accommodate memory address spaces required by modern display controllers. Save the configuration changes and reboot the physical server before logging into the Proxmox web interface.
Configuring Proxmox Boot Parameters for VFIO
Kernel parameters govern hardware isolation during the boot sequence. Administrators must edit the bootloader configuration to enable memory management isolation. Access the Proxmox host shell via the web interface or an SSH connection to update the configuration file.
For systems utilizing GRUB, open the configuration file using a text editor and locate the default Linux boot line. Append the appropriate kernel flags based on the processor manufacturer. For Intel processors, add `intel_iommu=on` alongside `iommu=pt`. For AMD processors, add `amd_iommu=on` alongside `iommu=pt`. Update the bootloader by running the update command appropriate for the distribution.
For systems utilizing `systemd-boot`, modify the entry configuration file located in the EFI system partition. Add the identical kernel parameters to the options line. After saving the modifications, reboot the Proxmox host to apply the new kernel flags permanently.
Loading Required VFIO Kernel Modules
Kernel modules manage hardware abstraction layers for device assignment. Administrators must ensure that VFIO drivers load correctly during system initialization. Open the `/etc/modules` file and append the following module names on separate lines:
- `vfio`
- `vfio_iommu_type1`
- `vfio_pci`
- `vfio_virqfd`
These modules enable the Linux kernel to intercept device requests and expose them directly to userspace applications through an IOMMU-protected environment, as detailed in the Linux VFIO documentation. Save the file and update the initial ramdisk environment using the host command line utility to ensure these drivers initialize early in the boot process.
Identifying GPU and Audio Controller Addresses
Every PCIe device possesses a unique hexadecimal address string. Administrators must identify both the graphics processing unit and its associated onboard audio function. Execute the PCI listing utility in the Proxmox shell to examine connected hardware.
Locate the graphics card entry and its corresponding multimedia controller. These components typically share an identical parent bridge or reside within the same IOMMU group. Document both hexadecimal addresses carefully. Device assignment fails if the administrator passes the video controller while leaving the integrated high-definition audio controller attached to the host operating system.
Verifying IOMMU Groups and Device Isolation
Device isolation integrity dictates whether a graphics card can be assigned without conflicts. Run a shell script designed to traverse sysfs paths and output all detected IOMMU groups. Inspect the resulting text to locate the group containing the previously identified graphics and audio addresses.
Ideally, the graphics card and its audio function should reside within their own dedicated IOMMU group. If other critical motherboard devices share the same group, assignment becomes problematic or impossible without switching PCIe slots. When sharing occurs, moving the card to a different physical slot on the motherboard often resolves group conflicts.
Blacklisting Host Graphics Drivers
The host operating system must not claim the graphics hardware during boot. If Proxmox loads open-source or proprietary drivers for the target device, hardware assignment to a virtual guest fails. Administrators must blacklist conflicting drivers such as `nouveau` for open-source NVIDIA cards or standard framebuffer drivers.
Create a configuration file inside the `/etc/modprobe.d/` directory to block the conflicting modules. Instruct the kernel to ignore the target graphics chipset by specifying vendor and device IDs. Update the initial ramdisk again to ensure these blacklist rules take effect immediately upon the next system restart.
Creating and Preparing the Virtual Machine
Constructing a new virtual machine requires specific parameters to ensure compatibility with passed hardware. Open the Proxmox web interface and launch the virtual machine creation wizard. Allocate sufficient processor cores and system memory matching the intended workload requirements.
Set the machine type to the modern Q35 chipset rather than the legacy Intel 440FX architecture. The Q35 chipset provides native PCIe root ports necessary for proper device communication. Select the OVMF UEFI firmware option instead of SeaBIOS, as modern graphics cards require UEFI initialization routines to function inside a virtual guest. Do not attach a display device during creation, or set it temporarily to serial or standard vnc until secondary configuration finishes.
Assigning the GPU via Proxmox GUI or CLI
After creating the guest instance, administrators can attach the physical hardware. Navigate to the hardware tab of the virtual machine within the Proxmox web interface. Click the add menu and select raw PCI device.
Choose the identified graphics card address from the drop-down list. Check the boxes for all-functions to ensure the associated audio controller is included in the assignment. Enable the `PCI-Express` flag if available to improve stability with modern graphics cards. Alternatively, administrators can modify the virtual machine configuration file directly in the `/etc/pve/qemu-server/` directory by adding a `hostpci` line specifying the hexadecimal addresses.
Configuring Guest Operating System and Drivers
Boot the virtual machine and access it through a remote administration protocol or the temporary hypervisor display. The guest operating system should detect the new hardware inside its device manager as an unknown video controller or standard VGA device.
Download and install the official vendor driver package corresponding to the graphics card model inside the guest operating system. Restart the virtual guest after the installation completes. Verify that the control panel or command line utilities report normal operation of the assigned hardware.
Troubleshooting Common Passthrough Errors
Virtualization administrators frequently encounter specific error codes when configuring hardware assignment. Code 43 errors in Windows guests typically indicate that the graphics driver detects a hypervisor environment and refuses to initialize. Resolving this requires editing the virtual machine configuration file to hide the hypervisor signature from the guest operating system.
Another frequent issue involves initialization freezes during boot. These freezes usually stem from incorrect ROM bar handling or missing UEFI firmware support. Administrators can export the physical card’s ROM file, store it in the Proxmox firmware directory, and reference it explicitly within the virtual machine configuration parameters to bypass initialization failures.
Managing Live Migration and Backup Limitations
Hardware assignment introduces specific operational constraints regarding cluster management. Virtual machines utilizing direct hardware assignment cannot undergo live migration to another physical node while running, because the hardware state is tied exclusively to the host motherboard. Administrators must shut down the guest before initiating migration procedures.
Furthermore, backup operations require careful planning. Snapshot capabilities might fail or exclude the passed hardware state depending on the backup utility configuration. Administrators should implement reliable guest-level backup solutions rather than relying solely on hypervisor-level snapshot tools for state recovery.
Key Takeaways
- Hardware assignment requires Intel VT-d or AMD-Vi processor support and properly configured motherboard firmware.
- Kernel boot parameters and VFIO module loading isolate peripherals from the host operating system.
- Both the graphics controller and its associated audio function must be assigned together.
- Virtual machines require the Q35 machine type and OVMF UEFI firmware for successful initialization.
- Direct hardware assignment prevents live migration of the virtual machine across different physical hosts.
Frequently Asked Questions
What processor features are required for GPU passthrough on Proxmox?
The host processor must support Intel VT-d or AMD-Vi IOMMU virtualization extensions. These features must also be enabled directly within the motherboard UEFI firmware settings.
Why does my GPU show Code 43 in a Windows virtual machine?
Code 43 occurs when the NVIDIA or AMD driver detects a virtualized environment. Hiding the hypervisor signature inside the Proxmox virtual machine configuration file usually resolves this error.
Can I migrate a Proxmox virtual machine with a passed-through GPU?
Live migration is impossible with direct hardware assignment because the guest relies on physical hardware attached to a specific host motherboard. The virtual machine must be powered off before migration.
Do I need a second graphics card in the Proxmox host?
A secondary graphics card or integrated graphics is strongly recommended for the Proxmox host. This allows the host to maintain its own display output while the primary card is dedicated to a virtual guest.
How do I assign the onboard audio along with the graphics card?
Checking the all-functions box in the Proxmox GUI when adding the PCI device ensures that both the video controller and its companion audio function pass through to the guest simultaneously.
Mediated devices and SR-IOV present alternative virtualization models that partition supported hardware rather than assigning an entire GPU, as documented in the VFIO mediated-device guidelines.

