Skip to content

Templates

The old mvmctl template command family is gone. The current reusable blueprint is a project directory with:

  • mvm.toml or Mvmfile.toml for build input and runtime sizing;
  • flake.nix for 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.

Terminal window
mvmctl init my-worker --preset worker
cd my-worker
$EDITOR mvm.toml
mvmctl build
mvmctl up

The 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.

  • Pin Nix inputs in flake.lock.
  • Keep mvm.toml small: flake, profile, vcpus, mem, data_disk, and optional name.
  • 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.