Guide

VM Lifecycle

Create, start, stop, and remove microVMs

vmsan provides commands to manage the full lifecycle of Firecracker microVMs.

Create a new VM

Use vmsan create to spin up a new microVM:

vmsan create --runtime node22 --memory 512 --cpus 2

You can configure the VM with these flags:

FlagDefaultDescription
--vcpus1Number of vCPUs
--memory128Memory in MiB
--runtimebaseRuntime label (base, node22, python3.13)
--disk10gbRoot disk size
--timeoutnoneAuto-shutdown timeout (e.g. 1h, 30m)
--connectfalseAutomatically connect to the shell after creation
--projectnoneProject label for grouping VMs
--snapshotnoneSnapshot ID to restore from
Add --connect to immediately open a shell session after the VM is created.

Create a VM from a Docker image

Build a root filesystem from any Docker or OCI image:

vmsan create --from-image node:22-alpine

See the Docker Images guide for more details.

List all VMs

vmsan list

Use the alias vmsan ls for a shorter command. Add --json for structured output.

Start a stopped VM

vmsan start <vm-id>

Stop a running VM

vmsan stop <vm-id>

Remove a VM

vmsan remove <vm-id>

Use the alias vmsan rm for a shorter command.

Removing a VM deletes its chroot directory and state file permanently.

Connect to a running VM

Open an interactive shell session:

vmsan connect <vm-id>

This opens a WebSocket PTY connection to the in-VM agent, providing a full terminal experience.

Copyright © 2026