From 456236792f50e21e7ff9f9310d26aeed6a4b4a5b Mon Sep 17 00:00:00 2001 From: opencode Date: Wed, 21 Oct 2026 20:59:16 +0300 Subject: [PATCH] fix(pxe-infra): give the rig guest an e1000 NIC instead of virtio-net (T24) With virtio-net the guest's OVMF claims the device with its own virtio-net driver and exposes no SNP handle, so iPXE falls back to its own virtio-net driver and cannot open the device the firmware already holds. The interface stays closed, the routes are marked inaccessible and every HTTP fetch fails with 'Network unreachable' - the chain dies before the payload is even fetched. Measured on rydiwo 2026-10-21 with the diagnostic autoexec.ipxe: virtio-net-pci: net0: ... using virtio-net ... [closed] route: net0: 10.66.0.10/255.255.255.0 gw 10.66.0.1 (inaccessible) ping: timeout ; http://10.66.0.1/boot.ipxe... Network unreachable e1000: net0: ... using 82540em ... [open] route: net0: 10.66.0.10/255.255.255.0 gw 10.66.0.1 ping: replies ; boot.ipxe / vmlinuz-virt / initramfs-virt all ok The guest kernel is unaffected: linux-virt ships e1000.ko and the read-only payload loads it from the rootfs. --- modules/pxe-infra/vm.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/pxe-infra/vm.nix b/modules/pxe-infra/vm.nix index 3ac4fea..7fe7afb 100644 --- a/modules/pxe-infra/vm.nix +++ b/modules/pxe-infra/vm.nix @@ -181,7 +181,25 @@ -drive if=pflash,format=raw,file=$VARS \ $EXTRA_DRIVES \ -netdev bridge,id=net0,br=${config.pxe-infra.bridge.name},helper=/run/wrappers/bin/qemu-bridge-helper \ - -device virtio-net-pci,netdev=net0,mac=${config.pxe-infra.vm.mac} \ + # e1000, NOT virtio-net-pci (T24, 2026-10-21). + # + # With virtio-net the guest's OVMF claims the device with its + # OWN virtio-net driver and does not expose an SNP handle, so + # iPXE falls back to ITS OWN virtio-net driver - and cannot + # open the device, because the firmware already holds it: + # net0: ... using virtio-net on 0000:00:02.0 (Ethernet) [closed] + # route: net0: 10.66.0.10/255.255.255.0 gw 10.66.0.1 (inaccessible) + # http://10.66.0.1/boot.ipxe... Network unreachable + # The interface is closed, so no route is usable and every + # HTTP fetch fails - the chain dies before the payload. + # + # With e1000 the firmware exposes SNP, iPXE uses the + # firmware's path ("using 82540em ... [open]"), the routes are + # usable and the chain works end to end. + # + # The guest kernel is unaffected: linux-virt ships e1000.ko and + # the worker payload loads it from the read-only rootfs. + -device e1000,netdev=net0,mac=${config.pxe-infra.vm.mac} \ -boot $BOOT_ORDER \ -nographic \ -serial mon:stdio