ctx.snapshots().get(name) for a history and ctx.checkpoints().get(id) for one checkpoint. Both collections retain the selected provider. Cloud supports individual disk checkpoints. Spawning from an exact remote checkpoint requires a managed ID. An explicit host-volume path restore selects the contents currently at that path.
Sandbox capture
sandbox.snapshot()
Sandbox; an existing group is refused.
sandbox.snapshot_with()
Example
Example
SnapshotCreateResult with the group, exact first checkpoint and publication-owned head outcome. Read that checkpoint when you need the artifact produced by this call; another capture may already have moved head. An omitted member name is generated. Full capture and integrity recording are explicit options.
Snapshot group methods
Snapshot::open()
get (Get in Go) to select a bare group name from the default store.
Snapshot::get()
Snapshot::list()
group.name()
group.head()
None after explicit clearing. The returned checkpoint retains its identity if the head changes later.
group.set_head()
HeadUpdate.
group.clear_head()
group.checkpoints()
group.get_checkpoint()
group.checkpoint()
group.checkpoint_with()
SnapshotCaptureOptions; return CheckpointCaptureResult with the exact checkpoint and its publication-owned head outcome. Imported or orphaned groups refuse capture; a same-name replacement sandbox does not rebind them. One sandbox may have several groups, but each group binds one sandbox instance. An existing group’s destination cannot be changed by capture options.
Snapshot::load()
load_with() for publication and result semantics.
Snapshot::load_with()
Example
Example
group is a name and files is &[PathBuf]. The callback receives SnapshotImportOptions, with destination/base/head controls and no second group selector. Legacy artifact-loading methods retain LoadOpts and its optional group field. Returns SnapshotImportResult: snapshot, checkpoints, added, reused, head_update, operation_id, and warnings.
The result contains every unique supplied checkpoint, including bundled dependencies, in stable ID order. added and reused identify what was new versus already installed at publication; archive argument order does not select the head. The head outcome belongs to this operation and does not change when another operation edits the group. Multiple incomparable tips can commit a headless group; explicit head selection refuses ambiguous tips.
A successful return confirms publication and catalog completion. Warnings describe deferred cleanup after commit. A structured import error distinguishes no publication, confirmed publication with a later failure, and an unknown outcome needing recovery. Import never binds a group to a source sandbox. See atomic import requirements for filesystem capabilities and maintenance requirements.
group.inspect()
checkpoint_count, source.recorded_name, source.current_name, source.database_uuid, source.sandbox_id. The source is absent for an unbound history; otherwise its SnapshotSourceStatus is Available, MissingSandbox or DifferentCatalog. Saved and current names distinguish renames; identity is the catalog UUID plus sandbox row ID, so deleting and recreating the same name does not rebind the group.
Source availability is observed separately from group metadata and is not a guarantee of later capture readiness. Inspection does not change the selected head or create a missing catalog identity. Invalid metadata and database failures remain errors, rather than being reported as unbound. Obtain a member with get_checkpoint for its immutable metadata.
group.verify()
SnapshotGroupVerifyReport. Its state distinguishes Complete, Incomplete, Invalid, and Empty; checkpoints preserves each member’s identity, path, optional existing SnapshotVerifyReport, and findings. payload_hashes counts physical payload hash passes, deduplicated per algorithm. Headless groups are valid, while empty groups report zero checked. To check only head, obtain group.head() and verify that checkpoint.
Missing checksums return explicit incomplete coverage. Corruption, missing files, unsupported required features, and operational failures return MicrosandboxError::SnapshotVerification(report) when a meaningful group report exists; failures before selection return the ordinary SDK error. Inspect the attached report without treating the failed call as success. Selected payloads stay reader-pinned until verification finishes, including after caller cancellation. Same-group captures, imports and head changes wait for hashing to finish. Concurrent older removers must be stopped or upgraded; reads and sandbox execution can continue.
group.remove()
SnapshotRemoveResult with group, removed, head_update, and warnings. The member IDs and cleared-head outcome belong to this operation. Empty groups can be removed. Active readers and surviving external dependents refuse removal; there is no force bypass for an entire group.
If publication commits but catalog cleanup fails, the call raises or returns MicrosandboxError::SnapshotGroupRemovalRecovery { result, source }. The attached result means removal already happened. Cleanup warnings after successful catalog reconciliation are returned in the result. An uncertain durability outcome is an error requiring recovery rather than a claimed successful removal. Later listing recovers pending cleanup without deleting a replacement group.
group.spawn_sandbox()
RestoreBuilder and cannot replace the selected source. See destination options.
group.spawn_sandbox_with()
group.spawn_sandbox_with_progress()
spawn_sandbox_with().
group.spawn_sandbox_with_progress_with()
spawn_sandbox_with().
SnapshotSourceRecoveryError
A failed capture can still have published its requested artifact before source recovery failed.SnapshotSourceRecoveryError preserves the source checkpoint recovery locator and, when publication completed, the published artifact’s kind, path, identity, digest and head_update. The head outcome belongs to that publication even if another operation changes the group afterward. Archive-only capture and older producers omit it; do not infer it by reading the current head. Inspect those details before retrying or removing the source. The error does not prove that the source is running or safely paused.
Static methods
Checkpoint::local()
Checkpoint::remote()
Checkpoint::builder()
from_sandbox(); see SnapshotBuilder for options.
Parameters
nameimpl Into<String>Member name; generated when empty. Names must not contain path separators or start with
..Returns
Builder for configuring the snapshot.
Example
Example
Checkpoint::create()
create() instead of constructing a SnapshotConfig by hand.
Parameters
configSnapshotConfigName, source sandbox, labels, and integrity flag.
Returns
The created artifact handle.
Example
Example
Checkpoint::create_archive()
Example
Example
Checkpoint::open()
Example
Example
group:member, or path. This is a fast metadata operation: it verifies the manifest structure, recomputes the manifest digest, and checks that the upper file exists with the recorded size. It does not read the full upper contents; use verify() for that.
Local artifact path resolution
Local artifact path resolution
For the local backend, relative artifact paths are resolved when the operation begins, and the returned snapshot retains that absolute location. Changing the process working directory later does not retarget an opened or listed snapshot. Local import, export, copy, and capture destinations are also resolved before asynchronous work starts. Group names and snapshot IDs continue to resolve through the snapshot store.
Parameters
path_or_nameimpl AsRef<str>Group head,
group:member, or filesystem path to an artifact directory.Returns
The opened artifact handle.
Checkpoint::open_ref()
SnapshotReference.
Use this when passing through a reference returned by another SDK operation;
it preserves whether the backend should resolve the value as an identifier or
a path.
Example
Example
Checkpoint::get()
Example
Example
Checkpoint by group head, group:member, stable snapshot ID, descriptor digest, or artifact path. Global IDs and digests must resolve unambiguously.
Parameters
name_or_digest&strGroup head,
group:member, stable snapshot ID, descriptor digest, or artifact path.Returns
Handle backed by the matching index row.
Checkpoint::list()
Example
Example
Returns
Indexed snapshot resources, ordered by creation time descending.
Checkpoint::list_dir()
snapshot.json) and malformed artifacts.
Parameters
dirimpl AsRef<Path>Directory to scan for artifacts.
Returns
One handle per valid artifact found.
Checkpoint::remove_by_reference()
Example
Example
force is set. When you remove the head, its surviving same-group parent becomes the new head. If it has no such parent, the group has no selected head.
Parameters
path_or_name&strGroup head,
group:member, unambiguous snapshot ID or digest, or artifact path.forceboolWhen
true, remove even if the snapshot has indexed children.Checkpoint::remove_ref()
checkpoint.reference(). For a path or name, use remove_by_reference().
Checkpoint::reindex()
dir.
Parameters
dirimpl AsRef<Path>Directory of artifacts to index.
Returns
usize
Number of artifacts indexed.
Example
Example
Checkpoint::reindex_default()
reindex() with the
local backend’s configured store and returns MicrosandboxError::Unsupported
on backends without a rebuildable artifact index.
Checkpoint::save_by_reference()
.msb archive (or plain .tar) at out. Recorded payload integrity is preserved but not executed implicitly; call verify() when an independent content scan is part of your workflow. See SaveOpts to also include ancestors and the OCI image cache.
Parameters
name_or_path&strGroup head,
group:member, or artifact path to save.out&PathOutput archive path. Parent directories are created if missing.
optsSaveOptsBundling options.
SaveOpts::default() writes the head snapshot only, zstd-compressed.Example
Example
Checkpoint::load()
Example
Example
.msb or .tar, detected from magic bytes) into the snapshots directory (or dest), routing any bundled image-cache entries into the global cache and registering everything found in the index. Structural and archive-entry checks remain mandatory, while recorded payload integrity is preserved for explicit verify(). Returns a handle for the head snapshot.
Parameters
archive_path&PathArchive to unpack.
destOption<&Path>Destination directory.
None uses the default snapshots directory.Returns
Handle for the archive-declared head snapshot, which may differ from the receiving group’s selected head.
Example
Example
Instance methods
Methods on an openedCheckpoint artifact.
Checkpoint::load_with_base()
Checkpoint::load_with_options()
Checkpoint::load_many()
Checkpoint::group_head()
Import options
Options forLoadOpts.
With divergent tips, the existing head stays selected; a new group has no head. Select a member explicitly. Identical members may be reused; conflicting identities fail. See archive imports.
Instance methods
snap.destroy()
Unsupported until the provider supports atomic conditional deletion. force does not bypass identity checks or enable unsafe path deletion. Explicit path-selected removal remains available through Checkpoint::remove_ref(...) and context collections.
Example
Example
snap.id()
snap.digest()
Returns
&str
Manifest digest in
sha256:hex form.snap.reference()
Returns
SnapshotReference
Typed backend-relative snapshot reference.
snap.state()
snap.labels()
snap.manifest()
Example
Example
Manifest, validated against the captured descriptor identity: stable identity, state closure, capture provenance, pinned image, parent identity, and extensions. Mutable labels are exposed by labels() and are not part of this descriptor.
Returns
Parsed snapshot manifest.
snap.size_bytes()
Returns
u64
Upper-layer apparent size in bytes.
snap.path()
MicrosandboxError::Unsupported because managed and host-volume artifacts are
not paths on the client host. Use reference() for backend-neutral restore and
lifecycle operations.
snap.save_to()
MicrosandboxError::Unsupported.
snap.copy_to()
MicrosandboxError::Unsupported
when save() is awaited.
snap.verify()
Example
Example
NotRecorded without reading the payload when integrity is absent. Checkpoint state validates the root, manifests, disk layers, device/execution objects, and every referenced memory object, then returns the verified checkpoint root.
Returns
Digest, path, and upper-layer verification status.
snap.name()
None when no alias is recorded.
snap.parent_digest()
None when no parent is known. The accessor retains its existing parent_digest name.
snap.image_ref()
snap.format()
Returns
Upper-layer format (
Raw today).snap.created_at()
checkpoint.save()
Example
Example
.msb archive. save_to retains its explicit options form for compatibility. See the archive compatibility option before sending output to an older reader.
checkpoint.save_with()
checkpoint.remove()
Snapshot::remove(reference, force), use Checkpoint::remove_by_reference(reference, force). When you already hold the checkpoint, checkpoint.remove() returns its removal result and checkpoint.destroy(force) returns success or failure.
Example
Example
CheckpointRemoveResult with id, optional head_update, and warnings. The head outcome belongs to this operation; later head edits do not change it. Removing the head selects its surviving same-group parent or clears selection. Removing another member reports an unchanged head. Standalone artifacts have no head outcome.
Force permits removal despite indexed children, but never bypasses reader protection. A repeated removal reports a missing checkpoint rather than fabricating another successful result. Backends or native libraries without exact-removal reporting return unsupported instead of falling back to deletion by name.
If removal commits but catalog cleanup fails, the call returns MicrosandboxError::SnapshotRemovalRecovery { result, source }. Its result is authoritative: removal already happened. Recover the affected storage before retrying cleanup; do not assume an error means the checkpoint still exists.
checkpoint.remove_with()
CheckpointRemoveOptions. Force never bypasses active-reader protection.
checkpoint.spawn_sandbox()
checkpoint.spawn_sandbox_with()
checkpoint.spawn_sandbox_with_progress()
checkpoint.spawn_sandbox_with_progress_with()
SnapshotBuilder
Builder for aSnapshotConfig. Obtained via Checkpoint::builder(name). A source sandbox is required (from_sandbox); the other setters are optional. Every setter returns Self, so calls chain.
Example
Example
.from_sandbox()
build() and create() fail without it.
Parameters
source_sandboximpl Into<String>Name of the OCI-rooted source sandbox. Local disk capture also supports running and paused sources. Cloud requires a stopped persistent source.
.group()
.dest_dir()
Parameters
dest_dirimpl Into<PathBuf>Parent directory to create the artifact in (e.g. a larger volume).
.label()
Parameters
keyimpl Into<String>Label key.
valueimpl Into<String>Label value.
.force()
.record_integrity()
verify() checks it explicitly; ordinary open, boot, save, load, and upgrade preserve the value without adding an independent payload pass.
snapshot_builder.full()
.guest_flush()
GuestFlush::Auto; see guest writeback.
.build()
SnapshotConfig without creating the snapshot. Errors with InvalidConfig if from_sandbox was not called. For capturing, use create instead; it calls build internally.
Returns
Validated snapshot configuration.
.create()
Checkpoint::create(self.build()?).
Returns
The created artifact handle.
SnapshotCopyBuilder
Returned byCheckpoint::copy_to(). It reuses the source disk
data while replacing explicit-snapshot metadata in a new archive.
Forking
Fork a running or paused local sandbox to create a child with copy-on-write memory. The source returns to its previous state, and each child needs an unused name.Sandbox has the same methods. See the forking guide for backend limits and disk bindings.
fork()
Example
Example
.fork().await to start it.
fork_many()
Example
Example
ForkOutcome has a name and a result for that child. Validation or capture errors fail the outer call; a child startup error leaves successful siblings running. Stop successful children when finished.
The builders support .record_integrity(), .guest_flush(GuestFlush::Required), and .volume() for rebinding captured disks. Forks cannot add new block devices, and batch children cannot share a writable disk image. See fork disk bindings.
The single-child builder also exposes .fork_with_progress() with the local feature. Import GuestFlush from microsandbox::snapshot; see guest writeback for the policy.
ForkOutcome.name is a String; ForkOutcome.result is a MicrosandboxResult<Sandbox>.
branch(), branch_many(), the builder .branch() terminal, .branch_with_progress(), and the BranchBuilder, BranchManyBuilder, and BranchOutcome types remain deprecated aliases.
RestoreBuilder
Restore into a new detached sandbox. Disk boots fresh; full resumes execution. See restore examples and progress.Example
Example
restore.cow_memory()
restore.forked()
restore.disk_only()
restore.snapshot_base()
restore.restore()
restore.restore_with_progress()
restore.init()
"auto". Full-memory resume rejects an explicit choice, including "auto"; use disk_only() to boot the captured disk with a new init.
restore.init_with()
restore.hostname()
allow_missing_resources() to resume with unavailable devices (full restore records warnings). This is separate from strict/relaxed validation of supplied mappings; inheritance does not waive missing backing. Root and owned storage remain required.
Destination options
Destination options
restore.cpus()
restore.memory()
restore.max_cpus()
restore.max_memory()
Destination command defaults
Useworkdir, shell, entrypoint, cmd, env and envs to configure new commands in the destination. They work for disk boots and full resumes without changing captured processes or starting a workload during restoration. An explicit empty entrypoint or CMD clears that default; omission keeps existing resolution. Environment defaults combine with per-command overrides through the ordinary SDK rules. Guest working directories must exist. These are explicit destination settings, not automatically saved snapshot configuration. Unsupported native bindings reject new explicit options before dispatch.restore.label()
restore.labels()
label().restore.network_policy()
restore.pull_policy()
if-missing and explicit never can use complete local/archive content offline. always revalidates that exact digest through its registry, even when cached, and fails if the registry cannot provide it. This never follows the original mutable tag or changes the source snapshot.restore.proxy()
restore.max_connections()
restore.disable_network()
restore.security()
restore.guest_clock()
Sync or Off. Supports full restores.restore.max_duration()
restore.idle_timeout()
restore.port()
restore.port_bind()
restore.port_udp()
restore.port_udp_bind()
restore.vsock()
restore.vsock_dgram()
restore.user()
restore.log_level()
restore.dangerously_inherit_resources()
restore.external_mount_policy()
NetworkPolicy. Use |v| v.captured() for a private captured volume.restore.volume()
|v| v.captured() to select its captured private volume.
Example
Example
restore.allow_missing_resources()
Sandbox::restore_ref()
Checkpoint or Checkpoint reference without reinterpreting an identifier as a path. This uses the same dedicated restore options and backend capability checks as Sandbox::restore().
Example
Example
Sandbox group creation. Both retain the receiver’s backend and stable sandbox identity.
Compaction
Compact a local sandbox’s root or owned disks. See compaction for examples and recovery requirements.compact.disk()
/ selects the root.
compact.root_disk_only()
compact.layers()
compact.dry_run()
compact.apply()
guest_path. materialized_bytes counts copied bytes, not reclaimed space. Times are microseconds: per-disk total_us covers preparation; aggregate total_us also includes switching; pause_us measures the shared VM pause.
Types
SnapshotCreateResult
snapshotSnapshotCreated history, bound to the source sandbox’s stable identity.
checkpointCheckpointInitial immutable member, even if another capture has since advanced the head.
head_updateHeadUpdateHead outcome recorded by this capture operation.
CheckpointCaptureResult
checkpointCheckpointThe exact captured member.
head_updateHeadUpdateWhether and why this operation advanced the head.
SnapshotImportResult
operation_idStringIdentifier for this import attempt, also carried by structured import errors.
snapshotSnapshotDestination history, including when it has no selected head.
checkpointsVec<Checkpoint>Every unique member supplied by the batch, including bundled dependencies, in ID order.
addedVec<SnapshotId>Members newly installed by this operation, in ID order.
reusedVec<SnapshotId>Identical members already installed at commit time, in ID order.
head_updateHeadUpdateHead decision made by this operation, including ambiguous headless imports.
warningsVec<String>Cleanup still needed after a confirmed successful commit.
SnapshotGroupInfo
nameStringSelected group’s name.
pathPathBufGroup location in the backend’s filesystem, not a client-relative path.
headOption<SnapshotId>Selected checkpoint, including an explicitly headless history.
checkpoint_countu64Number of installed members observed with this head.
sourceOption<SnapshotSourceBinding>Local capture association; absent for unbound/imported histories.
SnapshotSourceBinding
database_uuidStringCatalog instance that owns the recorded sandbox row.
sandbox_idi32Stable row identity within that catalog, never resolved by its display name.
recorded_nameStringSandbox name when this association was recorded.
current_nameOption<String>Current name of the same sandbox instance, when available.
statusSnapshotSourceStatusWhether the recorded source still belongs to this catalog and exists.
SnapshotRemoveResult
groupStringRemoved group’s name.
removedVec<SnapshotId>Exact member identities removed, in stable order.
head_updateHeadUpdateThis operation’s head removal, including an already-headless group.
warningsVec<String>Recoverable cleanup remaining after confirmed publication.
CheckpointRemoveResult
idSnapshotIdImmutable identity removed by this operation.
head_updateOption<HeadUpdate>Group head decision; absent only for a standalone artifact.
warningsVec<String>Removal committed, but these cleanup steps remain recoverable.
SnapshotGroupVerifyReport
groupStringSelected group name.
stateSnapshotVerificationStateAggregate status; an empty group is not a verified checkpoint.
checkpointsVec<CheckpointVerification>All selected members, in stable directory-name order, including malformed members.
payload_hashesusizePhysical payload hash passes; shared hard links use one pass per required algorithm.
CheckpointVerification
idOption<SnapshotId>Stable member identity, if the directory name or descriptor provided a valid identity.
pathPathBufSelected member directory.
stateSnapshotVerificationStateComplete, incomplete or invalid; members never have the group’s empty state.
reportOption<SnapshotVerifyReport>Existing artifact report when all recorded checks succeeded, even if coverage is incomplete.
findingsVec<SnapshotVerificationFinding>Every observed failure or missing checksum, including shared dependency failures.
SnapshotVerificationFinding
pathPathBufFile or member whose verification could not complete.
kindSnapshotVerificationFindingKindMachine-readable reason, independent of the human diagnostic.
detailStringDiagnostic explaining the failed check.
HeadUpdate
groupStringLocal group name.
previousOption<String>Previously selected stable snapshot ID, if the group had a head.
headOption<String>Stable snapshot ID selected after the operation, or none for a cleared head.
reasonHeadUpdateReasonExplanation for advancing or retaining the selected head.
changedboolWhether the selected head changed.
SnapshotReference
A backend-neutral snapshot locator. Obtain one fromCheckpoint::reference() or
Checkpoint::reference() and pass it to
Sandbox::restore_ref(), Checkpoint::open_ref(), or
Checkpoint::remove_ref(). This preserves whether a value is an identifier or a
path without exposing the selected backend.
Auto(String)Compatibility string interpreted automatically by the active backend
Id(String)Identifier resolved by the selected backend
Path(String)Path in the selected backend’s filesystem namespace
SnapshotReference::auto(), id(), or path() to construct a reference.
value() returns the underlying string and kind() returns auto, id, or
path.
Checkpoint
See handle methods for metadata access and lifecycle operations. A handle retains its selected backend; callers do not need to interpret the storage location.SnapshotConfig
Inputs to create a snapshot. A type alias forSnapshotSpec. Usually built via SnapshotBuilder rather than constructed directly.
SnapshotFormat
On-disk layer representation. A checkpoint can contain a chain of raw and qcow2 layers; full execution-state metadata is represented separately.RawRaw ext4 image, sparse on disk
Qcow2qcow2 with an optional backing chain
SnapshotScope
Checkpoint payload scope. Parsing accepts every known scope so older runtimes can still list and inspect artifacts they cannot restore; create and restore paths enforce support. Re-exported asmicrosandbox::snapshot::SnapshotScope.
DiskDisk-only snapshot; captures the writable filesystem state
FullDisk plus memory, execution, device, and admitted resource state
SaveOpts
Options forCheckpoint::save_by_reference() and instance save_to() methods. Implements Default; SaveOpts::default() writes the selected checkpoint without walking its parents, zstd-compressed.
compatibility
ArchiveCompatibilityCurrent (default) or V0_7_8; selects archive metadata and required-capability compatibility, without rewriting checkpoint identitywith_parents
boolWalk the parent chain and include each ancestor in the archive
with_image
boolBundle the OCI image artifacts (EROFS layers, fsmeta, VMDK descriptor) from the global cache so the archive boots offline
plain_tar
boolSkip zstd compression and write a plain
.tar. Default: zstdsinceOption<String>Omit disk layers and RAM objects supplied by an exact base. Mutually exclusive with
last_layers and with_parents. Full checkpoint metadata remains complete.last_layersOption<usize>Include the newest N sealed disk layers. Loading omitted dependencies requires a base; memory, execution and device objects remain complete.
SnapshotVerifyReport
Result of explicit snapshot verification.digest
StringCheckpoint manifest digest
path
PathBufArtifact directory
upper
UpperVerifyStatusUpper-layer result; retained as
NotRecorded for checkpoint statecheckpoint
Option<CheckpointVerifyStatus>Verified checkpoint root for full state
coverage
SnapshotVerifyCoverageComplete or Incomplete { unrecorded: Vec<PathBuf> }; includes every required disk payloadUpperVerifyStatus
Upper-layer content verification result.NotRecorded-No content integrity descriptor was recorded in the manifest
Verified- algorithm: String -
digest: StringRecorded integrity matched the computed digest
Manifest
The snapshot artifact descriptor, serialized assnapshot.json (DESCRIPTOR_FILENAME) and re-exported as microsandbox::snapshot::Manifest. Its SHA-256 digest is computed over RFC 8785 canonical JSON. Stable lineage identity is the separate snapshot_id field.
schema
StringExactly
microsandbox.snapshot/1snapshot_id
SnapshotIdStable opaque snapshot identity
scope
SnapshotScopeFile or checkpoint state family
state
SnapshotStateClosed file-layer or checkpoint representation
capture
SnapshotCaptureImmutable capture time, lineage, source checkpoint, and consistency
image
ImageRefImage the snapshot was taken from
parent
Option<SnapshotId>Logical parent identity, or
None for a rootrequires
Vec<String>Sorted must-understand extension names
extensions
BTreeMap<String, Value>Namespaced additive descriptor fields
ImageRef
Reference to the OCI image the snapshot was taken from. Re-exported asmicrosandbox::snapshot::ImageRef.
reference
StringHuman-readable image reference (e.g.
docker.io/library/python:3.12)manifest_digest
StringDigest of the OCI manifest, in
sha256:hex formDiskLayer
One member of the complete oldest-first file-layer closure. Re-exported asmicrosandbox::snapshot::DiskLayer; UpperLayer remains a source-compatibility alias.
layer_id
DiskLayerIdStable opaque physical-member identity
format
SnapshotFormatraw or qcow2virtual_size
u64Guest-visible size in bytes
backing
Option<DiskLayerId>Immediate predecessor; raw layers cannot have one
payload.file_kind
LayerFileKindregularpayload.integrity
Option<UpperIntegrity>Optional content integrity descriptor;
None on local hot pathsUpperIntegrity
Content integrity descriptor for the captured upper layer.Sha256sha256Fields:
digest. Exact released compatibilitySparseSha256V1msb-sparse-sha256-v1Fields:
digest. Exact released sparse-SHA compatibilityFileMerkleBlake3V1msb-file-merkle-blake3-v1Fields:
root, logical_size, leaf_size. Current opt-in sparse-aware integritySnapshotCaptureOptions
capture.initial_checkpoint()
capture.name()
capture.full()
capture.record_integrity()
capture.guest_flush()
.guest_flush(GuestFlush::Required) on snapshot, fork, or fork-many builders, or source.pause_with_guest_flush(GuestFlush::Required). Import GuestFlush from microsandbox::snapshot.
The default Auto flushes live disk-only captures, but adds no optional flush to full captures, forks, or pause. Skip retains mandatory storage barriers.
A paused disk capture needs a matching prior flush; cloud rejects non-Auto policies. See guest flush policy reference.
capture.label()
capture.dest_dir()
SnapshotImportOptions
import.dest_dir()
import.base()
import.set_head()
import.maximum_disk_bytes()
LoadOpts supports the same field and builder method. Temporary staging may need additional disk space.