Virtual Gaming Computer

This project focuses on setting up VFIO PCIe passthrough to run a high-performance Gaming Virtual Machine (VM) on my Workhorse. By configuring my system to isolate and assign a dedicated GPU, I achieve near-native gaming performance while maintaining a fully functional Linux host.


Dedicated Gaming Virtual Machine

Configured a Windows virtual machine with SR-IOV passthrough
Passed through an RTX 3070, Dedicated 2.5Gbe NIC and 4TB NVMe SSD.

BIOS Configuration

Enabled IOMMU (VT-d/AMD-Vi) in BIOS to allow direct hardware access to virtual machines.
Adjusted settings to ensure PCIe devices are properly isolated for passthrough.

VFIO in Linux

Configured VFIO modules to bind the dedicated GPU to pass through instead of the host.
Edited the GRUB boot parameters to prevent conflicts and ensure proper device isolation.

Disabling NVIDIA Drivers

Prevented the NVIDIA proprietary drivers from loading on the Linux host, ensuring the GPU remains available for pass-through.
Utilised vfio-pci override to attach the GPU to the VM at boot.

Optimised for Gaming Performance

Optimized CPU pinning and hugepages and combined it with custom CPU flags to reduce latency and improve performance.

Sunshine/Moonlight Network Streaming

By having a dedicated 2.5Gbe NIC I was able to keep latency low and enable the guest to be accessible anywhere on my network. We’re using the VM in our living room, kitchen etc.

This setup enables me to enjoy Windows gaming without dual-booting, leveraging the power of my Linux host while maintaining a flexible and secure environment.
While working on this project I learned:
– A better understanding of SR-IOV and VFIO pass-through
– How to hide the virtualisation from Windows through CPU flags
– That VNAT adds latency and that I needed a dedicated NIC
– How to run a Proxmox node in headless mode
– Sunshine and Local Network Streaming