Reference
Filesystem & Drives
Drive model, mount points, and filesystem layout inside microVMs.
Drive Model
Section titled βDrive ModelβEach microVM gets up to four virtio-block drives on the supported workload backends:
| Drive | Mount Point | Permissions | Purpose |
|---|---|---|---|
/dev/vda | / | Read-write (ext4) or read-only (squashfs) | Root filesystem |
/dev/vdb | /mnt/config | Read-only | Application configuration |
/dev/vdc | /mnt/secrets | Read-only | API keys, tokens, credentials |
/dev/vdd | /mnt/data | Read-write | Persistent data (survives restarts) |
Root Filesystem
Section titled βRoot FilesystemβThe rootfs is built by mkGuest and contains:
- Busybox β init system, core utilities
- Overlay-aware boot logic β the
/initpath and/mvm/runtimemount point needed to bring the guest runtime online - Guest agent β present directly in dev/preferred-overlay images; provided by the sealed runtime overlay on overlay-required boots
- Your packages β specified in the flakeβs
packagesparameter - Service scripts β generated from
services.<name>definitions - Health check configs β generated from
healthChecks.<name>
Runtime Overlay
Section titled βRuntime OverlayβSealed workload boots can attach a second read-only, verity-protected runtime
overlay that is mounted inside the guest at /mvm/runtime.
- The overlay carries the guest runtime binaries such as
mvm-guest-agent,mvm-guest-netinit, andmvm-egress-client. - Only guest-executed runtime binaries belong in this artifact. Host-side helpers and bootstrap tools stay outside the overlay.
- The rootfs keeps the mount point and boot logic, but sealed
RequiredOverlayimages intentionally omit the baked fallback binaries. - The overlay is version-matched to the running
mvmctlbuild; mvm does not attach an arbitrary βlatestβ overlay. - The overlay is mounted read-only in the guest. A backend that cannot provide
that read-only contract must stay on the fallback policy instead of using
RequiredOverlay. - Before attach, mvm re-verifies the cached
overlay.ext4,overlay.verity,overlay.roothash, andVERSIONfiles against the recordedchecksums-sha256.txtmanifest and refuses the boot on any mismatch. - The artifact is shared across microVMs from the local cache under
~/.mvm/cache/runtime-overlay/<version>/<arch>/.
Runtime updates
Section titled βRuntime updatesβRuntime overlay updates are a next-boot operation:
- A stopped VM can pick up a newer version-matched overlay the next time it starts.
- A running VM keeps the overlay version it booted with until restart.
- mvm does not support hot-swapping or live-remounting a different runtime overlay into an already-running guest.
ext4 vs squashfs
Section titled βext4 vs squashfsβ| ext4 | squashfs | |
|---|---|---|
| Read-write | Yes | No (tmpfs overlays on /etc, /var) |
| Size | Larger | ~76% smaller (LZ4 compression) |
| Agent injection | Supported | Not supported (read-only) |
| Boot time | Similar | Similar |
Config Drive
Section titled βConfig DriveβThe config drive (/dev/vdb, mounted at /mnt/config/) contains non-sensitive configuration:
config.jsonβ mvm instance metadata (name, role, resources)- Application config files from host directories you mounted yourself
Files are written with mode 0444 (world-readable, read-only mount).
Secrets Drive
Section titled βSecrets DriveβThe secrets drive (/dev/vdc, mounted at /mnt/secrets/) contains sensitive data:
secrets.jsonβ tenant-level secrets- Application secret files from host directories you mounted yourself
Security hardening:
- Uses tmpfs-backed file (never hits persistent storage)
- Drive image files are 0400 (root-only); at boot, secrets are copied to a tmpfs with 0440
root:<serviceGroup>so only service group members can read them - Mount with
ro,noexec,nodev,nosuid - Recreated on every start (never reused)
Data Drive
Section titled βData DriveβThe data drive (/dev/vdd, mounted at /mnt/data/) is a persistent ext4 volume:
- Created once per instance (specified size)
- Survives restarts and snapshots
- Use for application state, databases, logs
Specify size with --volume:
mvmctl machine run --flake . --volume ./data:/data:1024For managed encrypted local volumes and workspace cleanup policy, see Persistent workspaces.
Filesystem Layout
Section titled βFilesystem Layoutβ/ # rootfs (ext4 or squashfs)βββ bin/ # busybox symlinksβββ etc/β βββ mvm/β βββ integrations.d/ # health check definitions (JSON)β βββ probes.d/ # read-only probe definitions (JSON)βββ init # busybox init scriptβββ mvm/β βββ runtime/ # read-only runtime overlay mount point when attachedβββ nix/store/ # Nix packagesβββ mnt/β βββ config/ # /dev/vdb (ro) β config driveβ βββ secrets/ # /dev/vdc (ro) β secrets driveβ βββ data/ # /dev/vdd (rw) β data driveβββ var/ # runtime state (tmpfs on squashfs)Host-Side Layout
Section titled βHost-Side LayoutβOn the host (on Linux) or inside the builder VM (on macOS), mvm stores data at:
~/.mvm/ # MVM_HOMEβββ templates/β βββ <name>/β βββ revisions/β βββ <hash>/β βββ vmlinuxβ βββ rootfs.ext4 (or rootfs.squashfs)β βββ warm-meta.json (if warmed)βββ vms/ βββ <name>/ βββ firecracker.pid βββ firecracker.socket βββ firecracker.log βββ console.log βββ fc-base.json βββ vmlinux βββ rootfs.ext4 βββ runtime/ β βββ v.sock # per-VM Firecracker vsock UDS βββ volumes/ βββ config.ext4 βββ secrets.ext4 βββ data.ext4The shared guest-runtime overlay cache lives separately under
~/.mvm/cache/runtime-overlay/<version>/<arch>/ and contains the sealed
overlay.ext4, overlay.verity, overlay.roothash, VERSION, and
checksums-sha256.txt metadata reused by every VM that boots that runtime
version.