From a1aaa4690863bb8764b56bbb24f1104edd2173a3 Mon Sep 17 00:00:00 2001 From: oqyude Date: Tue, 13 Oct 2026 03:27:31 +0300 Subject: [PATCH] fix(pxe-infra): script=no,downscript=no on the tap netdev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default invokes /etc/qemu-ifup after opening the tap (and /etc/qemu-ifdown on shutdown). That script does not exist on a stock NixOS install, and QEMU fails with: network script /etc/qemu-ifup failed with status 256 The pre-start already brings the tap up (ip link set … up) and the postStop tears it down, so we tell QEMU not to call out to /etc/qemu-if{up,down} via script=no, downscript=no. --- 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 37954ca..b463b48 100644 --- a/modules/pxe-infra/vm.nix +++ b/modules/pxe-infra/vm.nix @@ -82,7 +82,7 @@ -smp ${toString config.pxe-infra.vm.cpus} \ -m ${config.pxe-infra.vm.memory} \ -drive if=pflash,format=raw,readonly=on,file=${pkgs.OVMF.fd}/FV/OVMF.fd \ - -netdev tap,id=net0,ifname=pxe0-tap \ + -netdev tap,id=net0,ifname=pxe0-tap,script=no,downscript=no \ -device virtio-net-pci,netdev=net0,mac=${config.pxe-infra.vm.mac} \ -boot n \ -nographic \