From e70fde4e0449a6f08578b410538d7bd7038e2cfa Mon Sep 17 00:00:00 2001 From: oqyude Date: Tue, 13 Oct 2026 03:17:27 +0300 Subject: [PATCH] fix(pxe-infra): point OVMF pflash at the firmware file, not the dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nixpkgs OVMF.fd is a multi-output derivation whose outPath is a *directory* containing FV/OVMF.fd (combined CODE+VARS), FV/OVMF_CODE.fd, FV/OVMF_VARS.fd, and share/. QEMU needs a regular file for -drive if=pflash,format=raw,readonly=on, and rejected the directory with: 'file' driver requires '.../OVMF-202608-fd' to be a regular file Use the combined FV/OVMF.fd (4 MB, CODE+VARS in one). Mounted read-only so the VM has no persistent NVRAM, which is what we want for a fresh-every-run rig (docs/ARCHITECTURE.md §L4). For proper NVRAM persistence across runs, the split CODE+VARS form with a per-VM writable VARS file would be the next step; not needed yet. --- modules/pxe-infra/vm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/pxe-infra/vm.nix b/modules/pxe-infra/vm.nix index c682ef6..1ff8a8a 100644 --- a/modules/pxe-infra/vm.nix +++ b/modules/pxe-infra/vm.nix @@ -65,7 +65,7 @@ -cpu host \ -smp ${toString config.pxe-infra.vm.cpus} \ -m ${config.pxe-infra.vm.memory} \ - -drive if=pflash,format=raw,readonly=on,file=${pkgs.OVMF.fd} \ + -drive if=pflash,format=raw,readonly=on,file=${pkgs.OVMF.fd}/FV/OVMF.fd \ -netdev bridge,id=net0,br=${config.pxe-infra.bridge.name} \ -device virtio-net-pci,netdev=net0,mac=${config.pxe-infra.vm.mac} \ -boot n \