Skip to content

KVM PCI Passthrough Error — Quick Fix

DodaTech Updated 2026-06-24 3 min read

In this tutorial, you'll learn about KVM PCI Passthrough Error. We cover key concepts, practical examples, and best practices.

The Problem

Attempting to pass a PCI device (GPU, NVMe, or network card) to a KVM VM fails. The VM cannot start, or the device shows as unusable inside the guest. The IOMMU groups may not be properly configured, or the host driver may still be bound to the device.

Error example:

Device 0000:01:00.0 is in use by driver nvidia
Failed to assign device: Device or resource busy
VFIO group is not viable: Group is not viable

The Fix

Step 1: Verify IOMMU is enabled

WRONG — trying to pass through devices without IOMMU support:

# IOMMU must be enabled in the kernel boot parameters
# Without it, PCI passthrough is impossible

RIGHT — check IOMMU is enabled:

# Check kernel boot parameters
cat /proc/cmdline

Output should include:

intel_iommu=on

or

amd_iommu=on

Verify IOMMU groups exist:

ls -l /sys/kernel/iommu_groups/

If the directory is empty or missing, add intel_iommu=on iommu=pt to the GRUB boot parameters in /etc/default/grub and run update-grub.

Step 2: Bind the device to vfio-pci

WRONG — assigning a device that is still bound to the host driver:

# The host driver claims the device and VFIO cannot access it

RIGHT — bind the device to vfio-pci:

# Find the device IDs
lspci -nn | grep -i nvidia

# Add to the vfio-pci driver
echo "options vfio-pci ids=10de:1e87,10de:10f0" > /etc/modprobe.d/vfio.conf

# Rebuild initramfs
update-initramfs -u

# Reboot

Use DodaTech's PCI Passthrough Validator to verify IOMMU groups, driver binding, and interrupt remapping before configuring VM passthrough.

Prevention Tips

  • Always enable ACS (Access Control Services) on PCIe switches for better IOMMU group isolation
  • Verify the GPU has a UEFI-capable VBIOS for UEFI guest boot
  • Reserve the PCI device early in the boot process using the vfio-pci driver override
  • For NVIDIA GPUs, ensure the guest has the correct NVIDIA drivers installed
  • Use DodaTech's Device Compatibility Checker to validate passthrough feasibility

Common Mistakes with pci passthrough

  1. Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
  2. Using head and tail instead of pattern matching, causing runtime errors on empty lists
  3. Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks

These mistakes appear frequently in real-world KVM code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### What is an IOMMU group and why does it matter?

An IOMMU group is the smallest set of PCI devices that can be isolated from the host. All devices in a group must be passed to the same VM, or none at all. GPUs in the same IOMMU group as the NVMe controller or audio device often create passthrough complications.

Why does my GPU passthrough fail with error -110?

Error -110 usually means the device failed to reset or respond after being assigned to the VM. This commonly occurs with older GPUs that lack proper FLR (Function Level Reset) support. Try passing through the entire IOMMU group or use a vendor-reset tool for specific GPU models.

Can I use a GPU for both host and VM?

Yes, if the host has integrated graphics or a second GPU. The host can use the integrated GPU or the first discrete GPU, while the second discrete GPU is passed to the VM. You cannot share a single GPU between host and VM without SR-IOV support.

Related: DodaTech's GPU Passthrough Automation Suite simplifies the configuration process with automatic IOMMU group analysis and driver binding scripts.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro