Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sandboxes

A sandbox is an isolated Firecracker microVM with its own Linux kernel, filesystem, processes, and network stack. It is the environment where you run code, use tools, modify files, and start services.

A sandbox moves through the lifecycle shown below.

stateDiagram-v2
    [*] --> Creating
    Creating --> Running
    Running --> Pausing
    Pausing --> Paused
    Paused --> Resuming
    Resuming --> Running
    Running --> Snapshotting
    Snapshotting --> Running
    Running --> Forking
    Forking --> Running
    Running --> Killing
    Killing --> [*]
StateDescription
CreatingVM is booting, block devices are being attached, networking is being configured
RunningVM is ready. Commands can be executed, proxy traffic is routed, timeout is ticking
PausingMemory and disk snapshots are being captured
PausedVM is stopped. Snapshot artifacts are stored. No resources consumed
ResumingSandbox is being restored from its paused snapshot
SnapshottingA persistent snapshot is being captured; sandbox returns to Running after
ForkingSandbox is being cloned into child sandboxes; source returns to Running after
KillingVM is being torn down and resources released

Where to Go Next:

  • Starting a Sandbox — start a sandbox from a template, snapshot, or OCI image.
  • Working with Sandboxes — basic commands such as connect, execute commands, transfer files, pause, snapshot, fork, and delete.
  • Auto-Eviction — configure TTLs and expiration behavior of the sandbox.
  • Networking — configure ingress and egress policies of the sandbox.