Skip to content

Instantly share code, notes, and snippets.

@w1th0utnam3
Created September 11, 2018 08:48
Show Gist options
  • Save w1th0utnam3/98dd54dab53a2f3ccb7e8495716aa3ac to your computer and use it in GitHub Desktop.
Save w1th0utnam3/98dd54dab53a2f3ccb7e8495716aa3ac to your computer and use it in GitHub Desktop.
KVM/libvirt/QEMU Windows VM with GPU passthrough on Ubuntu host

GPU Passthrough for VM on Ubuntu

Main tutorial: https://ycnrg.org/vga-passthrough-with-ovmf-vfio/

Other resources:

Reset issue After powering off the Windows VM, it cannot be started again without a host power-cycle. Might be related to Windows not properly resetting the device and Linux being unable to power-cycle it by itself.

File changes

  • /etc/modules:
pci_stub
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
kvm
kvm_intel
nouveau
  • /etc/modprobe.d/blacklist-nouveau.conf:
blacklist nouveau
  • /etc/default/grub: add
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt pci_stub.ids=xxxx:xxxx,xxxx:xxxx"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment