Skip to content

The following steps will guide you through configuring and mapping a GPU device to a vm. While the steps are designed for a GPU, they can be modified to work with any PCI or USB device that requires mapping. Performed using Proxmox 8.4.

Requirements

To successfully map a GPU device, you'll need to first:

  • Enable gpu passthru
  • Enable rdp for windows vms
    • Ensure to configure another remote access method (RDP, VNC) for your Windows VM instance before assigning a GPU device.  The Proxmox web console will not work afterward since the signal is being routed through the GPU.

1. Create a resource mapping

A resource mapping allows us to map a group of PCI or USB device IDs under a unique name that makes it convenient to map in the next step.

  1. Log into the Proxmox web-console as root Users do not have permissions to create hardware mappings, so we'll create a mapping and then assign permissions for admins to assign it
  2. Go to Datacenter > Resource Mappings
  3. Click "Add"
  4. In the vendor column, look for "AMD" or "Nvidia"
  5. Select the "Pass through all functions as one device" above the NVIDIA rows
  6. Fill in an appropriate name.  No spaces or special characters
  7. Click "Create"

2. Add the pci device to the vm

This step assumes you have already created a Linux or Windows VM.  For Windows, you may want to turn off Windows updates for drivers.  Otherwise, Windows update will install a version of drivers that may not be desired.

  1. Log into the Proxmox web-console as root or your user

    User/Group device mapping permissions

    If not logging in as root, verify the user or group has the appropriate "Mapping.Use" permissions on the "/mapping/pci" path.

  2. Stop the VM if running

  3. Go to the VM > Hardware
  4. Click Add > PCI Device
    a. Select the Mapped device you created at the beginning
    b. Check "Primary GPU"
    c. Check "Advanced"
    d. Check "PCI Express"
    e. Click "Add"

3. Install gpu drivers

This step will not cover the installation of NVIDIA or AMD driver, it's just meant to inform. For Windows, the NVIDIA GPU may show up under Device Manager as "Microsoft Basic Display Adapter" until the appropriate drivers are installed.


grafts: