-
Notifications
You must be signed in to change notification settings - Fork 0
EGPU
Angelo Azevedo edited this page Jun 11, 2026
·
1 revision
This configuration contains an advanced virtualization stack optimized for on-the-fly Dynamic GPU Passthrough (VFIO).
A custom libvirt hook script (gpu-passthrough.nix) allows dynamic binding and unbinding of devices. This means:
- When the host system is running normally, the eGPU is bound to the native Linux drivers (e.g.,
amdgpuornvidia) and can be used for rendering on Linux. - When a Windows VM is started via
virt-manager, the hook script safely unbinds the Thunderbolt-connected eGPU from the native Linux drivers and binds it to thevfio-pcidriver. - The VM boots with direct hardware access to the eGPU, achieving near-native graphics performance inside the VM.
- Upon shutting down the VM, the script reverses the process, unbinding from
vfio-pciand re-binding to the native Linux driver so it can be used on the host again.
Simply connect the Thunderbolt eGPU, launch virt-manager, and start the VM. The libvirt hooks handle the driver unloading and rebinding seamlessly behind the scenes.