Ollama on Proxmox: GPU Passthrough for Local LLMs
On this page
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-rc0is 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
- In firmware, enable IOMMU (VT-d on Intel, AMD-Vi / IOMMU on AMD).
- On the Proxmox host, load the
vfio,vfio_iommu_type1andvfio_pcimodules, 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).- If the host still binds its own driver, pass the PCI IDs to
vfio-pcior blacklist that driver, then update the initramfs and reboot untillspci -nnkshowsKernel driver in use: vfio-pci(or no driver).- 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).- Inside the guest, install the vendor GPU driver, then follow the official Docker commands in the Docker guide.
- Confirm the GPU with
nvidia-smior the AMD equivalent, thendocker 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
- A CPU and motherboard that support IOMMU interrupt remapping: Intel VT-d or AMD-Vi (on arm64, SMMU). Proxmox notes that server hardware is often more reliable, and that not every consumer board works cleanly.
- A discrete GPU that Ollama documents as supported. Ollama's hardware page (checked 2026-11-13): NVIDIA cards need compute capability 5.0+ and driver 550 or newer (compute capability 5.0–6.2 needs driver 570 or newer). AMD support is via official ROCm (Linux needs the ROCm v7 driver) or Vulkan in the default image.
- Enough RAM and disk in the guest for the model you want. Passthrough does not shrink the model's VRAM requirement; size it with the hardware calculator.
- The GPU should be in a separate IOMMU group. It may share a group with its own functions (for example HDMI audio) or with its root port or PCI(e) bridge. If it is stuck in a large group with other devices, the wiki suggests trying another physical slot.
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:
- AMD CPUs: IOMMU is enabled in the kernel by default.
- Intel CPUs on recent kernels (6.8 or newer, which includes current Proxmox VE 9.2 kernels): also enabled by default. On older kernels, add
intel_iommu=onto the host kernel command line, then update the bootloader and reboot, as described in the PCI(e) Passthrough_Passthrough) wiki. - Optional, if your hardware supports it: add
iommu=ptfor IOMMU passthrough mode, which Proxmox says can improve performance by letting VMs bypass the hypervisor's default DMA translation.
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:
update-initramfs -u -k all
rebootAfter reboot, lsmod | grep vfio should list those three modules. Then check the kernel log:
dmesg | grep -e DMAR -e IOMMU -e AMD-ViYou 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):
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):
- Pass the IDs to
vfio-pciin a/etc/modprobe.d/file, for exampleoptions vfio-pci ids=1234:5678,4321:8765, using the vendor:device IDs fromlspci -nn. Include the GPU's audio function IDs when you will pass those through too. - Blacklist the host driver. Find it with
lspci -k(for examplelspci -k | grep -A 3 "VGA"), then addblacklist DRIVERNAMEto 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):
qm set VMID -hostpci0 02:00,pcie=onPassing 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:
pcie=on— use a PCIe port (q35 only). Some guest and device combinations need this.x-vga=on— mark the card as the VM's primary GPU and ignore the VM'svgasetting. Use this when the guest should display on that card. For Ollama as a compute accelerator, leave it off. The wiki says that if you only want a hardware accelerator (OpenCL or CUDA), you do not need a monitor on the card, and the GPU framebuffer cannot be shown in the Proxmox NoVNC or SPICE console anyway. Manage the guest over the regular virtual display, SSH, or a remote desktop inside the guest if you ever need the GPU as a display.
An official example that does set the GPU as primary:
qm set VMID -hostpci0 02:00,pcie=on,x-vga=onGive 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:
- NVIDIA: install a supported driver in the guest, then the NVIDIA Container Toolkit,
sudo nvidia-ctk runtime configure --runtime=docker, restart Docker, and start Ollama with--gpus=allas on docs.ollama.com/docker. - AMD: Ollama's official Docker command uses the
ollama/ollama:rocmimage and--device /dev/kfd --device /dev/dri. Vulkan is also documented in the defaultollama/ollamaimage when the container can see the devices.
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
- In the guest,
lspci -nnkshould show the GPU, with the vendor driver in use (notvfio-pci— that binding is on the host). - NVIDIA:
nvidia-smishould list the card. Thendocker exec ollama ollama psshould show the running model on the GPU, as described in the Docker guide. - If Ollama falls back to CPU after a Linux suspend/resume, Ollama's GPU docs describe a driver workaround:
sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm.
Things this setup does not do
- The host cannot use the card while the VM owns it, and you cannot pass the same card to two VMs at once.
- Live migration of a VM with a passed-through device is not something this guide (or the official passthrough wiki path used here) sets up. Plan to shut the VM down on this host.
- NoVNC / SPICE will not show the passed-through GPU's framebuffer.
- Intel iGPU Quick Sync for Jellyfin is a different device path. See Jellyfin on an N100.
- NVIDIA vGPU (mediated devices on specific datacenter cards) has its own Proxmox wiki page and is out of scope here.
Sources
- Proxmox VE PCI(e) Passthrough: https://pve.proxmox.com/wiki/PCI(e)_Passthrough (checked 2026-11-13)
- Proxmox VE 9.2 ISO installer (
proxmox-ve_9.2-1.iso): https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso (checked 2026-11-13) - Ollama v0.40.16: https://github.com/ollama/ollama/releases/tag/v0.40.16 (checked 2026-11-13)
- Ollama Docker (CPU, NVIDIA
--gpus=all, AMDrocm, Vulkan): https://docs.ollama.com/docker (checked 2026-11-13) - Ollama GPU support (NVIDIA compute capability and driver floors, AMD ROCm v7, Vulkan): https://docs.ollama.com/gpu (checked 2026-11-13)
- Open WebUI v0.13.3: https://github.com/open-webui/open-webui/releases/tag/v0.13.3 (checked 2026-11-13)
- NVIDIA Container Toolkit install guide: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html (checked 2026-11-13)
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).

