back to microsandbox

features / snapshots

save the disk state. start clean from it.

capture a stopped sandbox's disk state, archive it, and start a new sandbox from it.

dithered archive shelves representing saved sandbox disk state

01

keep the disk, drop the machine

snapshots capture the disk state of a stopped sandbox.

save the state you care about, remove the running machine, and start again later from the same bytes.

02

what a snapshot is, and is not

a snapshot is the disk of a stopped sandbox. it is not a live memory image, and there is no fork, pause, or resume. what you save is the filesystem, and you restore it into a fresh microvm.

how it works

capture and restore

01

stop the sandbox

snapshots are taken from a stopped sandbox, so the disk is consistent.

02

save it

with the msb cli: snapshot create --from, then snapshot save, optionally with the image so it is self-contained.

03

restore later

run --from-snapshot boots a fresh microvm with that disk state.

see it work

create, archive, and run from a snapshot

microsandbox cli 0.6.8
bash
msb stop eval-base
msb snapshot create swebench-base --from eval-base
msb snapshot save swebench-base ./swebench-base.tar.zst --with-image
msb run --from-snapshot swebench-base --name task-0441 -- pytest -q
msb rm --force task-0441

common questions

what is a good use for it?

a warm base image for evals or repeated tasks: set up once, snapshot, then start every run from the same disk.

start from saved disk state.