The life of one MicroVM
Slot, user, jail, boot, network, teardown.
Ignitify · on one fleet host
spawning
jailed
booting
running
idle · warm
running · run 2
idle · warm
teardown
gone
fleet host
spawn order ← host agent
Host daemonprivileged · local sockets only
network slots
001
002
003
004
005
006
007
008
tap-vm-005
guest address · /32 route
MAC
user id = base + 5
cgroup leafmemory.max · pids.max
jail · /srv/jailer/firecracker/<vm-id>/root · owned by that user · mode 0700
rootfs.ext4read-only · shared
code.ext4read-only
packagesread-only · optional
scratch.ext4writable · private
firecracker · own PID namespace
capabilities: none ✓
cgroup member ✓
· move into the cgroup leaf
· chroot into the jail
· new PID namespace
· drop to the per-VM user
· exec Firecracker
api.socket
machine-config
boot-source
drives
network
vsock
InstanceStart
guest · its own kernel (KVM)
supervisorstarted by PID 1 · dials vsock · pulls work
tenant code · uid 10001no_new_privs · seccomp: no vsock
idle
idle
init=/opt/ignitify/init.sh · ipv6.disable=1 · panic=1 · guest ip + gateway
vsock
vCPU · RAM
eth0
hardware is sealed at InstanceStart · network: none attaches no eth0
Kept on purpose: the guest serial log and the image cache.
control plane · not on the network
guest → daemon; work → agent → brain
hello
getPayload
heartbeat
postChunk
postResult
tap-vm-005/32 · rate limits
Internetegress_allow · via proxy
forwarded · kernel rules on the host
1 · anti-spoof · connection limit
2 · count the bytes
3 · fence: drop what is denied
4 · allowlist gate (web → egress proxy), NAT
✕ other guests
✕ host services
✕ metadata 169.254.169.254
The cgroup caps memory and processes. The tap caps the rate.
warm rules
Reuse: same tenant, same deployment, same boot shape. No new boot.
Evict: idle for 30 s, past its lifetime (1 h by default), or the fleet is short of free slots.
✓Placement forgotten
✓Reservation released, once the kill is confirmed
✓Usage recorded, once
✓Host network policy restated
✓Slot 005, its tap and its user id are free
A spawn order comes from the brain, through the host agent, on a local socket.
The daemon picks a free network slot. The slot gives the tap device, the address and the MAC.
The slot also gives the user id. Two live VMs never have the same one.
The jail is a private root directory. Only this VM's user can open it. The drives are linked into it.
Then the daemon makes a cgroup leaf with a memory limit and a process limit.
The jailer locks itself into the jail, drops its privileges, and then becomes Firecracker.
Before the VM starts, the daemon checks the process: no capabilities, and inside its cgroup.
The daemon configures the VM through a socket inside the jail. InstanceStart is last.
The guest kernel boots from the kernel arguments. The supervisor is the first process.
The supervisor calls the host over vsock. The host knows the VM by its socket, not by what it says.
Tenant code runs as a low-privilege user. It cannot open the control channel.
All guest traffic leaves through one tap. Kernel rules on the host decide what passes.
No rule trusts the guest. Other guests, host services and cloud metadata are out of reach.
The result goes back over vsock. A reusable VM stays warm for the next run of the same deployment.
A warm VM asks for work and claims the next run itself. No boot.
Idle again. After 30 seconds with no work, the brain evicts it.
The brain orders the teardown. The daemon does it: kill the VM, erase the jail, its drive links and the scratch disk.
The cgroup leaf is closed. The brain releases the reserved capacity and records the usage.
The slot goes back to the pool. The next VM starts clean.
Each VM gets its own of everything.
Then all of it goes back.
kernel
user id
jail
cgroup
network slot
scratch disk
Ignitify · Firecracker MicroVMs