Skip to main content

Module exec

Module exec 

Source
Expand description

mvmctl exec — boot a transient microVM, run one command, tear down.

Composes existing primitives: template artifact resolution → backend start → vsock guest agent → backend stop. The “what to run” is modeled as a tagged enum so future variants (mvmforge launch.json, baked-in template entrypoint) can be added without churning the inline-command surface.

Dev-mode only: inherits the existing policy.access.debug_exec gate enforced by the guest agent.

Structs§

AddDir
One --add-dir host:guest[:mode] mapping.
ExecRequest
All inputs to the orchestrator.
LaunchEntrypoint
Resolved entrypoint extracted from an mvmforge launch.json.

Enums§

ExecTarget
Where to source the command that runs inside the transient microVM.
ImageSource
Where the VM’s disk image and kernel come from.

Functions§

build_guest_wrapper
Build the wrapper script that runs inside the guest:
load_launch_plan
Read and parse an mvmforge launch.json from disk.
run
Run the request: boot, run, tear down.
shell_quote
Quote a single argument for inclusion in a shell command line.
snapshot_eligible
Decide whether snapshot restore is safe for this request.
transient_vm_name
Generate a transient VM name for an exec invocation.