Use this when a VM needs direct access to a physical GPU, NIC, NVMe or USB device, or when passthrough fails to start.
PCI & Device Passthrough
PCI and device passthrough give a VM direct access to a physical device — GPU, NIC, NVMe or USB controller — through the IOMMU, bypassing emulation for near-native performance at the cost of live migration and sharing.
1. Passthrough gives a VM direct device access.
2. Requires IOMMU, VFIO/DDA and unshared group.
3. Pins VM to host; limits migration and snapshots.
4. Guest needs native drivers.
5. Plan reset behaviour.
device → IOMMU → VFIO/DDA → guest driver
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
dmesg | grep -i -e DMAR -e IOMMU
lspci -nnk -s 01:00.0
find /sys/kernel/iommu_groups/ -type l | grep 01:00
Step 2 Common mistakes Narrow the fault
- IOMMU not enabled in firmware or kernel.
- Device shares an IOMMU group with others.
- Expecting snapshots with memory and live migration to work with passthrough.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
PCI passthrough assigns a physical PCI device directly to a VM, so the guest's own driver controls it with near-native performance.
Subtopic PCIe PassthroughPCIe passthrough is device assignment for PCI Express hardware such as GPUs, NVMe drives and NICs.
Subtopic IOMMUThe IOMMU (Intel VT-d, AMD-Vi) translates and isolates device DMA so a passed-through device can only access its VM's memory.
Subtopic IOMMU GroupsIOMMU groups are the smallest sets of devices the IOMMU can isolate; all devices in a group must be passed to the same VM.
Subtopic VFIOVFIO is the Linux kernel framework that safely hands PCI devices to user space, which QEMU/KVM uses for passthrough.
Subtopic GPU PassthroughGPU passthrough assigns a whole physical GPU to one VM through VFIO or DirectPath I/O for native graphics or compute performance.
Subtopic NIC PassthroughNIC passthrough gives a VM a physical network card or port for line-rate, low-latency networking, typically for firewalls or NFV.
Subtopic USB PassthroughUSB passthrough connects a physical USB device or controller to a VM — for license dongles, serial adapters or tokens.
Subtopic SR-IOVSR-IOV lets one physical PCIe device, usually a NIC, present many lightweight virtual functions that can be assigned to VMs directly, giving near-native networking to many VMs without dedicating a whole card to each.
Subtopic Virtual FunctionsVirtual functions (VFs) are the SR-IOV instances a physical function creates, for example echo 8 > /sys/class/net/<if>/device/sriov_numvfs.
Subtopic Passthrough TroubleshootingTroubleshoot passthrough by checking IOMMU is enabled (dmesg | grep -e DMAR -e IOMMU), the device's IOMMU group, that vfio-pci owns it (lspci -nnk), firmware settings like Above 4G decoding, and guest driver errors.
- Passthrough usually blocks live migration and snapshots.
- The whole IOMMU group goes to the VM.
- Host driver must release the device first.
lspci -nnk— devices and bound driversfind /sys/kernel/iommu_groups/ -type l— IOMMU groupsGet-VMAssignableDevice— Hyper-V DDA
ReferenceWhy it matters1 section · depth on demand
In depth
Device passthrough gives a VM direct control of a physical device for native performance or features the hypervisor cannot virtualise (GPUs, HBAs for ZFS/TrueNAS, high-speed NICs, licence dongles).
| Method | Granularity | Sharing | Live migration |
|---|---|---|---|
| PCIe passthrough (VFIO, DirectPath I/O, DDA) | Whole device/function | No | No |
| SR-IOV virtual function | Part of a NIC/GPU | Yes, many VFs | Limited |
| Mediated devices (vGPU) | Slice | Yes | Vendor-dependent |
| USB passthrough | One USB device | No | No |
Requirements: IOMMU enabled, device in a suitable IOMMU group, driver support in the guest.
ReferenceHow it works1 section · depth on demand
Platforms
| Platform | Feature |
|---|---|
| KVM/Proxmox | VFIO PCI passthrough |
| Hyper-V | Discrete Device Assignment (DDA) |
| vSphere | DirectPath I/O, vGPU |
ReferenceImportant terms & boundaries1 section · depth on demand
Options compared
| Option | Performance | Live migration | Sharing |
|---|---|---|---|
| Full PCIe passthrough (VFIO/DDA/DirectPath) | Native | No | One VM per device |
| SR-IOV virtual function | Near native | Usually no | Many VMs per device |
| Mediated device (vGPU) | High | Vendor-dependent | Many VMs |
| Paravirtual device | Good | Yes | Unlimited |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in PCI & Device Passthrough. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/driver-api/vfio.html · confidence 94%