Ollama on Proxmox: GPU Passthrough for Local LLMs

Guide · Local AI · Last updated · How we research

On this page
  1. What passthrough means
  2. Requirements
  3. Step 1: Enable IOMMU in firmware
  4. Step 2: Kernel, modules and a first check
  5. Step 3: Free the GPU from the host driver
  6. Step 4: Configure the VM
  7. Step 5: Drivers and Ollama inside the guest
  8. Checks
  9. Things this setup does not do
  10. Sources
  11. FAQ

Pinned versions: Proxmox VE 9.2 (ISO installer proxmox-ve_9.2-1.iso, official downloads, last updated 2026-05-21; after install, update packages to the latest 9.2 point release). Ollama v0.40.16 (GitHub release, published 2026-11-09 18:21 UTC — https://github.com/ollama/ollama/releases/tag/v0.40.16; v0.40.17-rc0 is a pre-release and is not pinned here). Open WebUI v0.13.3. Last checked: 2026-11-13.

This guide gets a discrete GPU into a Linux VM on Proxmox VE so Ollama can use it. The Ollama and Open WebUI Docker guide assumes the GPU is already visible to Linux (NVIDIA Container Toolkit and --gpus=all, or the official AMD rocm devices). On Proxmox that usually means PCI(e) passthrough of the card into the VM. It is not a copy of the Docker page, and it is not a hardware-sizing page — use the local LLM hardware calculator before you pick a model.

Quick answer

  1. In firmware, enable IOMMU (VT-d on Intel, AMD-Vi / IOMMU on AMD).
  2. On the Proxmox host, load the vfio, vfio_iommu_type1 and vfio_pci modules, update the initramfs, reboot, and confirm IOMMU is on. The card should sit in its own IOMMU group (with its audio function or root port is fine).
  3. If the host still binds its own driver, pass the PCI IDs to vfio-pci or blacklist that driver, then update the initramfs and reboot until lspci -nnk shows Kernel driver in use: vfio-pci (or no driver).
  4. Create a Linux VM with machine type q35, OVMF (UEFI) if the GPU ROM is UEFI-capable, and add the GPU as a Host PCI device with All Functions and PCI-Express. For compute-only use (Ollama), do not mark it as the primary GPU (x-vga=on).
  5. Inside the guest, install the vendor GPU driver, then follow the official Docker commands in the Docker guide.
  6. Confirm the GPU with nvidia-smi or the AMD equivalent, then docker exec ollama ollama ps.

A first Proxmox install is covered in Install Proxmox VE on a mini PC. For an Intel N100 box with no discrete NVIDIA or AMD card, stay on the CPU-only Docker path; passing the Intel iGPU for Jellyfin Quick Sync is a different guide.

What passthrough means

PCI(e) passthrough gives a virtual machine exclusive control of a physical PCI device. Proxmox's wiki is explicit: once the device is passed through, you cannot use it on the host or in any other VM.

PCIe passthrough (the pcie=on flag) is available only on q35 machines. That flag tells the guest the device is PCIe; it does not change the slot speed of the card.

This page follows the official PCI(e) Passthrough_Passthrough) wiki. It does not cover NVIDIA vGPU (that is a separate, datacenter-card path), Intel GVT-g, or unofficial LXC device bind-mounts.

Requirements

Step 1: Enable IOMMU in firmware

Reboot into the host BIOS/UEFI and enable the IOMMU option. Proxmox says the label is usually IOMMU or VT-d; use the name in your motherboard manual.

Step 2: Kernel, modules and a first check

On the Proxmox host:

Load the VFIO modules by creating a file such as /etc/modules-load.d/vfio.conf with:

vfio
vfio_iommu_type1
vfio_pci

(The wiki notes that this is not needed if you are passing through mediated devices such as vGPUs; that is not this guide.)

Refresh the initramfs and reboot:

bash
update-initramfs -u -k all
reboot

After reboot, lsmod | grep vfio should list those three modules. Then check the kernel log:

bash
dmesg | grep -e DMAR -e IOMMU -e AMD-Vi

You should see that IOMMU, Directed I/O and/or Interrupt Remapping are enabled; the exact wording varies by hardware and kernel. For more verification detail, Proxmox points at the "Verifying IOMMU Parameters" section of the same wiki.

List PCI devices and IOMMU groups (replace NODENAME with the host's node name, usually the short hostname):

bash
lspci -nn
pvesh get /nodes/NODENAME/hardware/pci --pci-class-blacklist ""

Note the GPU's address (for example 01:00.0) and its vendor:device IDs in square brackets.

If your platform cannot provide interrupt remapping, the wiki describes an allow_unsafe_interrupts=1 option for vfio_iommu_type1 and warns that it can make the system unstable. Prefer hardware that remaps interrupts properly.

Step 3: Free the GPU from the host driver

Proxmox tries to detach the device from the host automatically. If that fails, the wiki gives two official options (then update-initramfs -u -k all and a reboot for either):

  1. Pass the IDs to vfio-pci in a /etc/modprobe.d/ file, for example options vfio-pci ids=1234:5678,4321:8765, using the vendor:device IDs from lspci -nn. Include the GPU's audio function IDs when you will pass those through too.
  2. Blacklist the host driver. Find it with lspci -k (for example lspci -k | grep -A 3 "VGA"), then add blacklist DRIVERNAME to a /etc/modprobe.d/ file.

If the host driver still attaches first, the wiki describes a softdep so vfio-pci loads before the GPU modules (see man modprobe.d).

Verify with lspci -nnk. The GPU is ready when the line reads **Kernel driver in use: vfio-pci**, or when that line is missing entirely.

Step 4: Configure the VM

Proxmox's GPU guidance: best compatibility is q35 as the machine type, OVMF (UEFI) instead of SeaBIOS, and PCIe instead of PCI. OVMF needs a UEFI-capable GPU ROM; otherwise use SeaBIOS. To check the ROM, the wiki points at the PCI Passthrough Examples page.

Add the device in the VM's Hardware tab as Host PCI, or on the command line (example address 02:00, with both functions, PCIe, not as the primary display):

bash
qm set VMID -hostpci0 02:00,pcie=on

Passing 02:00 (no function number) sends all functions together, which is the same as the GUI All Functions checkbox — typically the GPU and its HDMI/DisplayPort audio function.

Useful options from the wiki:

An official example that does set the GPU as primary:

bash
qm set VMID -hostpci0 02:00,pcie=on,x-vga=on

Give the VM enough RAM and CPU for the models you plan to run, then start it and install a Linux distribution you are comfortable running Docker on.

Step 5: Drivers and Ollama inside the guest

This is the same path as a bare-metal Linux box, documented in the Docker guide:

Pin Ollama to ollama/ollama:0.40.16 if you want the version checked on this page. Then pull a model that fits the card — for example docker exec -it ollama ollama run llama3.2 (official default tag, 2.0GB, checked 2026-11-12 on the Docker guide).

Checks

Things this setup does not do

Sources

FAQ

Can I pass the GPU into an LXC container instead of a VM?

This guide does not do that. The official Proxmox path used here is PCI(e) passthrough into a KVM virtual machine. Running Ollama in Docker inside that VM matches Ollama's own Docker documentation. Unofficial LXC bind-mount recipes are not covered.

Do I need x-vga=on for Ollama?

No. That flag makes the passed-through card the VM's primary display. For CUDA or ROCm acceleration only, leave it off and use the VM's normal console or SSH. You also do not need a physical monitor on the card for that use, per the Proxmox wiki.

Will this work on an Intel N100 mini PC?

Not for NVIDIA or official AMD ROCm acceleration, unless you have added a discrete supported GPU. The N100 has an Intel iGPU, which is useful for Jellyfin Quick Sync but is not Ollama's NVIDIA --gpus=all path. Use the CPU-only Docker command, and size the model to the box's RAM with the hardware calculator.

Which Ollama version should I run?

This page is checked against v0.40.16, the latest stable GitHub release as of 2026-11-13. A v0.40.17-rc0 pre-release exists; it is not pinned here. Official rolling tags ollama/ollama and ghcr.io/open-webui/open-webui:main are documented too; pin a version if you want reproducible updates.

Why can't I see the GPU in the Proxmox web console?

Proxmox documents that the passed-through GPU's framebuffer is not available via NoVNC or SPICE. That is expected. Check the device from inside the guest (lspci, nvidia-smi).

Related guides