Guide
Docker Images
Build VM root filesystems from Docker or OCI images
vmsan can build a root filesystem from any Docker or OCI image, letting you use familiar container images as the base for your microVMs.
Create a VM from a Docker image
Use the --from-image flag:
vmsan create --from-image node:22-alpine
This pulls the image, extracts its filesystem layers, and converts them into an ext4 rootfs for Firecracker.
Use any OCI image
Any image reference supported by Docker works:
# Official images
vmsan create --from-image python:3.13-slim
# Custom registry images
vmsan create --from-image ghcr.io/myorg/myapp:latest
Combine with other flags
Docker images work with all other create flags:
vmsan create \
--from-image node:22-alpine \
--memory 512 \
--cpus 2 \
--publish-port 3000 \
--network-policy custom \
--allowed-domain "*.npmjs.org"
Extracted image rootfs files are cached in
~/.vmsan/registry/ to speed up subsequent VM creation with the same image.