Windows VM Performance and Usability Tweaks
This post is a retrospective on how I’ve been running Windows VMs on NixOS. It contains a little bit of what and why around how I’ve tweaked my NixOS config, my libvirt configs, and my vm runtimes. It’s more notes for me and assumes familiarity, but feel free to ask about anything in the comments.
I’ve been daily driving linux for a long while, but I’ve kept windows around in a VM for music software and games. I’ve also been thinking more about retiring my windows VM lately.
There’s a fair bit of cost to it. Getting near-native performance in a VM requires a separate video card from your host (or unloading your video card’s kernel modules, unbinding the EFI framebuffer on your host, and maybe ROM flashing depending on your card). Still cheaper than a separate PC, but not cheap, especially if you buy a motherboard that doesn’t cheap out on iommu groups.
Also, when I started exploring this option for running windows proton didn’t exist, and I wasn’t as happy with options for managing wine applications. Running in a VM generally gave much better performance and compatibility than running software through wine.
Over time the difference has shrunk pretty drastically. More DRM has started explicitly disallowing running in a VM. Valve and the open source community around proton have done amazing work. The cost hasn’t shrunk, and issues around power and heat management have only gotten worse as cards have become more power hungry and blower style cards have been phased out.
It’s a balancing act. I definitely will lose some sandbox benefits if I go through with it, but I have also been more interested in hardware acceleration on my host over time. It’s just become a lot less obvious of a decision over time for me.
Anyway though, this is just to collect all of the ideas I’ve incorporated in one place, since many of them don’t fit cleanly in my nix config, and I might deprovision it if I work out a few emulation workflows to a happy place.
