Working in the MicroVM
Sandbox management
Create, inspect, stop, pause, resume, and clean up local mvm sandboxes.
Use mvmctl when you need the local management layer for sandboxes.
Create or boot
Section titled “Create or boot”mvmctl init ./agent-sandbox --preset pythonmvmctl machine build --flake ./agent-sandboxmvmctl machine run --flake ./agent-sandbox --name agent-sandbox -dmvmctl machine build uses the builder VM for Linux image construction. mvmctl machine run boots the runtime guest from the built artifact.
Inspect
Section titled “Inspect”mvmctl machine lsmvmctl machine boot-report agent-sandboxmvmctl machine logs agent-sandboxUse JSON output where commands support it when integrating with tooling.
Operate
Section titled “Operate”mvmctl machine exec agent-sandbox -- python /work/task.pymvmctl machine fs ls agent-sandbox /workCommand execution and file operations cross trust boundaries. Keep command
args explicit and file paths narrow. Declare ingress before boot with
machine run --port.
Preserve state
Section titled “Preserve state”mvmctl machine pause agent-sandboxmvmctl machine resume agent-sandboxFull-VM memory checkpoints (vm-full class) are currently unavailable through the selectable workload runners; check mvmctl doctor for the authoritative capability before requesting them:
mvmctl machine checkpoint create agent-sandbox --class vm-fullmvmctl machine checkpoint restore agent-sandbox --name <checkpoint-name>Snapshots can contain memory, files, and runtime credentials. Apply retention and deletion policy.
Stop and clean up
Section titled “Stop and clean up”mvmctl machine stop agent-sandboxmvmctl env cleanupStopping compute is not the same as deleting all state. Check manifests, volumes, snapshots, and cache entries when you need stronger cleanup.