Skip to content

VM on Arch

Using Arch Linux as Host
Following this guide for single gpu passthrough
Passing through NVME with native Windows 10 installation
Use ssh to edit stuff from another computer if you stuff it up.
Need to download Windows 10 iso and also the Red Hat VirtIO drivers (which we use for the network adapter [NetKVM > w10 > amd64] and hard disk driver). Mount both these as SATA CD-ROMs or install in native windows.
libvirt hooks
These allow scripts to be run on startup and shutdown of the vm, doing stuff like unbinding and passing gpu from host, isolating cpu cores, cpu tuning etc.
PassthroughPOST
Basically it's a script in /etc/libvirtd/hooks called qemu, that directs to where certain shell scripts are
Specifically for my GPU:
Don't bind and unbind efi-framebuffer
Unload AMD kernal module below detaching devices from host.
Use .rom in /usr/share/vagbios extracted in NATIVE win10 using GPU-Z
ToDo:
virsh xml changes
msi for gpu in guest
might isolate usb card in kernel for vfio
Using Arch Linux as Host
Following this guide for single gpu passthrough
Passing through NVME with native Windows 10 installation
Use ssh to edit stuff from another computer if you stuff it up.
Need to download Windows 10 iso and also the Red Hat VirtIO drivers (which we use for the network adapter [NetKVM > w10 > amd64] and hard disk driver). Mount both these as SATA CD-ROMs or install in native windows.
libvirt hooks
These allow scripts to be run on startup and shutdown of the vm, doing stuff like unbinding and passing gpu from host, isolating cpu cores, cpu tuning etc.
The script from above installs a file qemu in /etc/libvirt/hooks which will conditionally run scripts at VM startup and shutdown. It does 4 things in my setup:
No sleep libvirt
unbind and pass GPU
CPU performance
CPU isolation
PassthroughPOST have an alternative using folders in /etc/libvirt/hooks/qemu.d/
Specifically for my GPU:
Don't bind and unbind efi-framebuffer - line 140 in /bin/vfio-startup.sh
Use .rom in /usr/share/vagbios extracted in NATIVE win10 using GPU-Z
Working xml with CPU pinning
virsh xml changes