Templates
The old mvmctl template command family is gone. The current reusable
blueprint is a project directory with:
mvm.tomlorMvmfile.tomlfor build input and runtime sizing;flake.nixfor the guest rootfs, packages, users, services, and kernel/rootfs content;- optional source files used by the guest image.
This keeps the boundary small: the manifest says what to build and how large the runtime sandbox should be; the flake says what goes inside the microVM.
Everyday flow
Section titled “Everyday flow”mvmctl init my-worker --preset workercd my-worker$EDITOR mvm.tomlmvmctl buildmvmctl upThe build produces a manifest-keyed slot in the local registry. Subsequent
mvmctl build calls re-read mvm.toml, rebuild the selected flake/profile,
and update the current revision for that slot.
What makes a good template
Section titled “What makes a good template”- Pin Nix inputs in
flake.lock. - Keep
mvm.tomlsmall:flake,profile,vcpus,mem,data_disk, and optionalname. - Put guest packages and services in the flake, not in ad-hoc host scripts.
- Treat network, secrets, and state retention as explicit runtime policy.
- Avoid mutable OCI tags for production examples; resolve to immutable digests.
Related pages
Section titled “Related pages”- Create a template for scaffolding and presets.
- Build & list for local registry commands.
- Lifecycle for rebuilds, drift, pruning, and deletion.
- Manifests for the complete command reference.