Checkpoint
checkpoint() snapshots VM memory and writable disk while keeping the Sailbox
running:
checkpoint() after important setup, such as installing packages,
fetching remote data, or writing files. On host failure, Sail restores from the
most recent completed checkpoint and does not replay commands that ran before
that checkpoint.
Fork
fork() creates a separate running Sailbox from the current in-memory process
state and writable disk:
expose.
Sleeping and paused Sailboxes can be forked too: the child boots from the
parent’s last checkpoint without waking the parent. Forking a running Sailbox
snapshots only the changes since its last checkpoint, so forks of frequently
checkpointed Sailboxes are fast.
Pause
pause() checkpoints the Sailbox and powers it down until you explicitly resume
it:
Sleep
sleep() checkpoints the Sailbox and powers it down until network ingress,
exec, or an explicit resume wakes it:
Sleep during inference
To automatically sleep a Sailbox while a foreground Sail inference call is in flight, include its ID in the request with theX-SailboxId header. Sail will
resume the Sailbox after the inference call completes.
Resume
resume() restores a paused or sleeping Sailbox and returns an updated handle:
Sailbox.connect() also verifies placement and resumes a paused or sleeping
Sailbox before returning:
Upgrade
upgrade() reboots the Sailbox on its same disk onto the latest in-guest Sail
agent, picking up new features, fixes, and performance improvements without
recreating the Sailbox:
upgrade() returns
True. On a paused or sleeping Sailbox the upgrade is recorded without waking
it and upgrade() returns False; it applies automatically the next time the
Sailbox wakes. A Sailbox that is already on the current agent version returns
True without rebooting.
A Sailbox whose agent is too old for the current platform to resume safely is
upgraded automatically the next time it wakes, as if upgrade() had been
called on it first.
Each Sailbox reports its agent version as guest_schema_version, and listing
supports a max_guest_schema_version filter to find Sailboxes that still need
an upgrade.
Terminate
terminate() permanently destroys the Sailbox:
pause() or sleep() when you want to keep
the VM state for later.