Skip to content

0.1.1: vm-runner as a stable entry a runner declaration can name - #2

Merged
Sunrisepeak merged 2 commits into
mainfrom
tools/vm-runner
Nov 11, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
tools/vm-runner

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

The vm-run tool was a development convenience: it booted the image, ran a command, and its exit status was whatever the transport last reported. This promotes it to the entry a machine-side runner declaration names, keeping every existing behaviour and adding the contract such a consumer needs.

  • each run boots a throwaway overlay (mktemp directory, qemu-img create -b), so the base image is never written and two concurrent runs cannot touch one another
  • the program's exit code is the guest program's exit code, transported verbatim
  • stdout and stderr stream back over the serial line; a timeout bound (--timeout, default 1800) reports and exits 124
  • KVM is used when /dev/kvm is writable and TCG otherwise
  • README states the runner declaration form -- [target.x86_64-freebsd] runner = ["<this tool>", "{}"] -- the image it expects (the xim freebsd-vm package) and its two qemu dependencies

Measured on a 14.5 image under KVM: a static x86_64-freebsd probe prints to both streams and returns 42, and 42 is what the tool exits; a second invocation of the same session shape returns its own status; two sessions racing each other return 3 and 5 respectively with no cross-talk; the overlay and temporary directories are removed after each run. The kernel and conformance layers of this repository are untouched.

Sunrisepeak and others added 2 commits November 11, 2026 13:23
The image package is named for what it is -- the FreeBSD 14.5-RELEASE
boot disk -- with its upstream stated; freebsd-vm said the mechanism,
not the thing.
@Sunrisepeak
Sunrisepeak merged commit 38999a4 into main Nov 11, 2026
9 of 10 checks passed
@Sunrisepeak
Sunrisepeak deleted the tools/vm-runner branch November 11, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant