Add Windows hypervisor primitives - #428
Conversation
c9e657a to
4ab69ee
Compare
-->
✱ stlc build✅ go code · compare
✅ python code · compare
✅ typescript code · compare
Diagnostics: ❗ 0 new / 1 total error, 💡 0 new / 5 total note
Build metadata
This comment is auto-generated by stlc and is kept up to date as you push. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 32eb71a. Configure here.

summary
targeted tests
go test ./lib/hypervisor/qemu ./lib/hypervisor ./lib/paths ./lib/instances ./cmd/api/api -run ... -count=1Long-running KVM and full CI suites were not run for this review pass.
Note
Medium Risk
Touches VM boot orchestration and TPM process lifecycle on the critical QEMU start path, though changes are gated by validation and profile capabilities rather than altering existing Linux direct-boot instances.
Overview
Adds UEFI firmware boot, Secure Boot OVMF, per-instance software TPM 2.0, and qcow2 disks on the standard amd64 QEMU (
q35) profile, aimed at Windows-style guests. SharedVMConfignow carries boot mode, firmware paths, TPM socket/state, and disk format; empty values keep the existing direct-kernel + raw-disk behavior for Linux callers.QEMU builds pflash drives, optional
smm=on/ secure flash, TPM-CRB devices, and format-aware disk drives. swtpm starts before QEMU (socket ordering), shares one cleanup stack with QEMU, waits out a prior instance’s exiting swtpm via a pid record, and logs toswtpm.log. Capabilities advertiseSupportsUEFIBoot/SupportsTPMon q35; cloud-hypervisor, firecracker, vz, and qemu-microvm reject firmware/TPM/qcow2 viaValidateDirectRawConfig. Instance logs API and OpenAPI addsource=swtpm; log rotation includes that file.CI installs ovmf and swtpm, exports OVMF paths, and runs a KVM integration test (
TestWindowsConfigIntegration) with retries.Reviewed by Cursor Bugbot for commit e591b6b. Bugbot is set up for automated code reviews on this repo. Configure here.