Files
komorebi/e2e/platforms/qemu_windows/W0.md
T
LGUG2Z 0c6864b4bc feat(e2e): add the W0 probe for a Windows 11 guest under QEMU
An unattended install of the Windows 11 evaluation ISO under QEMU with nested
KVM on WSL2, and a boot script that times the golden image to a desktop.
Measured: install 21.6 min, desktop in 36 to 51 s, with other VMs running.
W0.md records the numbers and what was found on the way: no SMM under nested
SVM, so no secure-boot OVMF; the firmware needs TPM support for Setup to see
the TPM; and the evaluation reads as expired unless the guest clock is set
back.
2026-10-30 18:22:44 -07:00

2.7 KiB

W0: Windows 11 under QEMU and nested KVM on WSL2

Measured 2026-10-28 on the WSL2 machine (AMD Ryzen 9 5900X, 24 vCPU, 31 GB, kernel 6.18.54.1-microsoft-standard-WSL2, nestedVirtualization=true), QEMU 10.2.2, swtpm 0.10.1, OVMF 202602, Windows 11 Enterprise Evaluation build 26100.1742 (the go.microsoft.com/fwlink/?linkid=2289031 ISO, 5.4 GB). Guest: 4 vCPU, 6 GB, NVMe disk, e1000e, VGA, -cpu host.

Other VMs were running on the machine during every number below (the kfde session's NixOS suites, about 5 cores busy), so these are pessimistic.

What Result
Unattended install, ISO to shutdown 1295 s (21.6 min)
Boot to a desktop, golden image on an overlay wallpaper 36 s, taskbar 51 s
Run dialog after Win+R through QMP on screen within 1.5 s

Verdict: usable. Nothing here says the Windows half must stop.

Findings that change the plan

  • No SMM under nested SVM. The secure-boot OVMF (OVMF_CODE.ms.fd, smm=on) stops the guest at once: KVM: entry failed, hardware error 0xffffffff with SMM=1. Run smm=off with an OVMF built without secure boot. So the guest has no Secure Boot, and Setup is told so with LabConfig\BypassSecureBootCheck from the answer file. This is what dockur/windows does in its default mode too.
  • The firmware needs TPM support, not only the device. With nixpkgs' default OVMF, Setup reports TpmVersion: 0 (a hard block) even though swtpm and tpm-crb are wired: nothing starts the TPM. OVMF.override { tpmSupport = true; } fixes it. BypassTPMCheck did not help.
  • The evaluation says "Windows License is expired" on the first boot: the ISO is a 2024 build and the guest clock is the host's. Starting the guest with -rtc base=2024-10-01T00:00:00 makes it say "Windows License valid for 90 days" (checked once, by screenshot). Every run needs that flag, or a newer ISO.
  • A second display head is not shown to work. -device secondary-vga gives QMP a second screendump target (device=vga2), but it only ever showed the firmware text; whether Windows treats it as a monitor is unknown, and needs the agent's displays verb. The virtio-gpu route needs the virtio-win driver in the image.
  • QMP screendump (png), send-key and the typing helper qmp-type.pl work, including inside Windows Setup (Shift+F10 gives a console), which is how the two blocks above were diagnosed.

Not verified

  • That setup.ps1 ran (UAC, lock screen, Defender, Windows Update): the guest has no agent yet, and the desktop screenshot cannot show it.
  • Second boot from the golden image without the answer ISO attached: done, but only on an overlay, once.
  • Responsiveness under load other than the above, and any run with the daemon in the guest.