virtio-vga is virtio-gpu plus VGA compatibility and exists only on x86;
arm's virt machine has none, so it needs the plain PCI device. Using
virtio-gpu-pci on x86 left the display frozen from the moment the kernel
took over scanout from UEFI, so CI recordings stopped at the GRUB handoff
even though the guest booted and the tests ran.
Creating the throwaway overlays lived inside run-vm.sh, but that script is
only the local entry point: in CI qemu-kvm-action starts QEMU itself, so it
was handed disk paths that nothing had created. Moves the logic into
vm_reset_disks in vm-config.sh, which both entry points already source.
The reset has to run after the guest images are in place, and must not end
up in any cache: the overlays are throwaway, so restoring them would carry
stale guest state into the next run and quietly undo the ephemerality the
suite depends on.
qemu-kvm-action always builds -cpu, -m, -smp and -enable-kvm from its own
inputs, so a flags list that also carries them produces a command line with
each specified twice, where which one wins depends on argument order.
Separates them into VM_ACCEL_FLAGS, which run-vm.sh passes and CI leaves to
the action's inputs, from VM_QEMU_FLAGS, which is the shared device list and
is safe for both. -machine stays in the shared list because the action has
no input for it.
The display backend defaulted to `none`, which meant a local run showed
nothing at all. The options genuinely differ per platform, so default them
rather than making everyone remember: Linux has `sdl`, which opens its own
window and takes gl=on; macOS QEMU from Homebrew has neither sdl nor gtk,
and `cocoa` needs OpenGL that build lacks -- under it SurfaceFlinger
SIGABRTs in a loop and nothing ever draws -- so macOS uses VNC and this
opens Screen Sharing against it automatically. GL follows the same
reasoning: on for local Linux, off under CI and on macOS.
Stopping the viewer needed the final QEMU invocation to stop being an
`exec`, which replaced the shell and left nothing able to clean up
afterwards. QEMU now runs as a child that is waited on, so the EXIT trap
fires on a normal exit and on Ctrl-C alike while still propagating QEMU's
status.
Screen Sharing is one shared app for every session and exposes no
scriptable window list, so closing just our window is not possible. It is
quit only when this run is what launched it, leaving sessions the user
already had open alone. VM_VIEWER=0 opts out entirely.
An ephemeral VM always boots unprovisioned, and Android 16 then runs adbd
in trade-in mode: the transport looks healthy and advertises shell_v2, but
every command except `tradeinmode` is refused with "error: closed".
wait-vm-startup.sh now waits for a usable transport rather than merely a
connected one, detects the condition, and escapes it with the single
command trade-in mode permits -- `tradeinmode evaluate` -- before marking
the device provisioned, which is what actually turns trade-in mode off.
All steps are idempotent, so it is a no-op on a provisioned guest.
Bliss OS is x86_64-only, so the e2e VM couldn't run on Apple Silicon at
all: there is no hardware virt for x86 guests, and QEMU disables MTTCG for
a strongly-ordered guest on a weakly-ordered host, so it would be
single-threaded TCG regardless of -smp.
Switch to LineageOS 23.2 packaged for upstream QEMU, which ships the same
image for arm64 and x86_64. vm-config.sh now derives the qemu binary,
machine, accel and cpu from VM_GUEST_ARCH (default: the host's, the only
case that gets hardware acceleration) and locates UEFI firmware across
Homebrew, Debian and Fedora layouts. The guest boots from disk over UEFI,
so kernel/initrd/cmdline are gone.
The VM is now ephemeral: run-vm.sh branches fresh qcow2 overlays off the
pristine bases on every start, so guest state never persists and tests
cannot leak into each other. Note efi_vars.fd is itself a sparse qcow2
whose virtual size matches the pflash unit, so it must be attached as
qcow2 rather than raw.