Built vmrunner, a libkrun-based Rust harness for privileged or destructive integration tests in disposable Linux VMs on Linux and macOS hosts. Butterpot's snapshot-deletion tests needed real Btrfs behavior without exposing a contributor's host filesystems to privileged test operations. That requirement shaped the isolation boundary, test API, and guest lifecycle.
The Rust test orchestrates one or more concurrent guests from the host, bringing multi-machine system tests into the unit-test workflow. Each node gets its own kernel instance and a fresh writable qcow2 overlay; the host root and workspace are not exported as guest directory shares. Linux user namespaces scope setup privileges without host-root execution, while macOS requires signing and re-executing the test binary with the Hypervisor entitlement. Multiple guests can communicate with each other using a layer-2 bridge.
Separated reusable image preparation, compiler sysroots, and guest-init setup from per-test execution. Cached preparation avoids repeating that work, while disposable overlays give each launch fresh disk state. Cold setup still costs minutes, so ordinary Rust tests remain appropriate for logic that needs no guest. The current runtime requires the test payload to be installed in the guest image, and its kernel comes from libkrunfw; changing the root image changes userspace, not the kernel version.