Windows 11 VM on nixos

Hey there, what would be the cleanest, easiest and most performant way to run a Windows 11 virtual machine on NixOS? Declarative would be a bonus point, but probably not possible to do that in a simple way. System specs are no problem, I have a high end pc.

1 Like

QEMU/KVM/libvirt is well supported.

I created a simple wrapper around QEMU called Quickemu which is in nixpkgs. Once installed you can do the following:

quickget windows 11
quickemu --vm windows-11.conf

quickget download the Windows 11 .iso and create an unattended.iso image, which makes the Windows install mostly automatic. That unattended.iso also autoruns all the VirtIO and SPICE drivers to optimise the Windows guest.


You can use libvirt setup with a compatible secure boot capable (not necessarily enabled) UEFI. Then make sure to add a software TPM to the virtual machine config. Windows 11 should happily install after that. Here is the snippet of my config that sets up libvirt.

You can choose a front end for libvirt to do the vm config, I use virt-manager.

@Wimpy I once tried quickemu, but quickget is just so slow for me for some reason. I have 200 mbits internet, but the download is always like 250KB /son quickget while it should be around 24MB/s. Any way to address this issue?

have you tested the command?

Works fine here, I’m getting solid 26MB/s.

Same here. Ever resolved it?

1 Like

disable secureboot="on"
i can boot after that

Same here. Really unusable. It’s not the servers per-se. When I download the same URL in browser it goes fast. (Also apparently if you re-run the command.)

Thank you for this information.

1 Like

This should be much improved in the upcoming Quickemu 4.9.3