vmhost.sh: boot without the NIC's iPXE option ROM; report qemu start errors

Debian's qemu-system-arm only recommends ipxe-qemu, so the virtio NIC's
efi-virtio.rom is missing from the image and qemu refused to start. The
VM never network-boots: drop the ROM. A qemu that exits at once now
shows its log instead of vm.sh waiting minutes to say it stopped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jeremy Karst 2026-11-18 23:43:12 -05:00
parent dcc4d129ab
commit 784173c31a
2 changed files with 7 additions and 3 deletions

View file

@ -125,7 +125,7 @@ start()
i=$((i + 1))
[ ${i} -lt 480 ] || die "no ssh after 4 hours; see console.log in the VM directory on the build host"
if [ $((i % 10)) = 0 ] && [ "$(vmhost status "${OSREL}")" = stopped ]; then
die "the VM stopped; see console.log in the VM directory on the build host"
die "the VM stopped; see console.log in the VM directory and 'podman logs gwbuild-${OSREL}' on the build host"
fi
sleep 30
done

View file

@ -155,7 +155,8 @@ start()
build_image
podman rm -f "${NAME}" > /dev/null 2>&1 || true
# neoverse-n1: ARMv8.2 with LSE atomics, without the costly emulation of SVE
# and pointer authentication. The ssh port is on the host's loopback only.
# and pointer authentication. The ssh port is on the host's loopback only. The
# NIC has no option ROM (iPXE network boot; not in the image, not needed).
podman run -d --name "${NAME}" --network host -v "${VMDIR}:/vm:z" "${IMAGE}" \
qemu-system-aarch64 -name "${NAME}" -machine virt,gic-version=3 -cpu neoverse-n1 \
-accel tcg,thread=multi -smp "${CPUS}" -m "${MEM}" \
@ -163,8 +164,11 @@ start()
-drive if=pflash,format=raw,file=/vm/efivars.fd \
-drive file=/vm/disk.qcow2,if=virtio,format=qcow2,discard=unmap \
-drive file=/vm/seed.iso,if=virtio,format=raw,readonly=on \
-netdev "user,id=n0,hostfwd=tcp:127.0.0.1:${PORT}-:22" -device virtio-net-pci,netdev=n0 \
-netdev "user,id=n0,hostfwd=tcp:127.0.0.1:${PORT}-:22" -device virtio-net-pci,netdev=n0,romfile= \
-display none -serial file:/vm/console.log > /dev/null
# qemu's own errors (bad options, missing firmware) end it at once
sleep 5
running || { podman logs "${NAME}" >&2; die "qemu exited"; }
echo ">>> started ${NAME}: ${CPUS} CPUs, ${MEM}, ssh on 127.0.0.1:${PORT}, console ${VMDIR}/console.log"
}