> ## Documentation Index
> Fetch the complete documentation index at: https://docs.celesto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SnapshotInfo

> SnapshotInfo reference: read snapshot metadata including ID, backend, artifacts, source VM config, creation time, type, and restore status.

`SnapshotInfo` tells you what SmolVM saved for a snapshot and how it can be restored. You receive it from `vm.snapshot(...)` and from snapshot list operations.

## Fields

<ResponseField name="snapshot_id" type="string" required>
  Unique snapshot identifier. If you do not provide one, SmolVM generates it.
</ResponseField>

<ResponseField name="vm_id" type="string" required>
  Source VM identifier.
</ResponseField>

<ResponseField name="backend" type="Literal[&#x22;firecracker&#x22;, &#x22;qemu&#x22;, &#x22;libkrun&#x22;]" required>
  Backend used by the source VM. Public docs focus on Firecracker and QEMU.
</ResponseField>

<ResponseField name="artifacts" type="SnapshotArtifacts" required>
  Files SmolVM wrote for the snapshot.

  <Expandable title="Artifact fields">
    <ResponseField name="state_path" type="Path | None">
      Separate VM state file. Present for Firecracker snapshots. QEMU stores full and diff snapshot state inside the qcow2 disk artifact, so this is `None` for QEMU snapshots.
    </ResponseField>

    <ResponseField name="memory_path" type="Path | None">
      Separate memory dump file. Present for Firecracker snapshots. QEMU stores full and diff snapshot memory inside the qcow2 disk artifact, so this is `None` for QEMU snapshots.
    </ResponseField>

    <ResponseField name="disk_path" type="Path" required>
      Saved disk artifact. Firecracker writes `disk.ext4`; QEMU writes `disk.qcow2`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="vm_config" type="VMConfig" required>
  VM configuration captured at snapshot time. SmolVM uses it during restore.
</ResponseField>

<ResponseField name="network_config" type="NetworkConfig" required>
  Network configuration captured at snapshot time. SmolVM uses it to restore the VM's network identity.
</ResponseField>

<ResponseField name="created_at" type="datetime" required>
  UTC timestamp for when the snapshot was created.
</ResponseField>

<ResponseField name="snapshot_type" type="SnapshotType" default="SnapshotType.FULL">
  What was saved: `FULL`, `DIFF`, or `DISK`. `DISK` is disk-only on QEMU and restores with a cold boot. On Firecracker, SmolVM still captures memory and VM state for every snapshot type.
</ResponseField>

<ResponseField name="restored" type="bool" default="false">
  Whether this snapshot has been restored at least once.
</ResponseField>

<ResponseField name="restored_vm_id" type="string | None" default="None">
  VM ID of the most recently restored instance, if any.
</ResponseField>

## Usage

### Creating a snapshot

```python theme={null}
from smolvm import SmolVM

vm = SmolVM()
vm.start()

snapshot = vm.snapshot(snapshot_id="my-checkpoint")
print(snapshot.snapshot_id)
print(snapshot.backend)
print(snapshot.artifacts.disk_path)

vm.close()
```

### Listing snapshots

```python theme={null}
from smolvm import SmolVMManager

with SmolVMManager() as sdk:
    snapshots = sdk.list_snapshots()
    for snap in snapshots:
        status = "restored" if snap.restored else "available"
        print(f"{snap.snapshot_id} ({status}) from {snap.vm_id}")
```

### Restoring from a snapshot

```python theme={null}
from smolvm import SmolVM

vm = SmolVM.from_snapshot("my-checkpoint", resume_vm=True)
print(vm.vm_id)
print(vm.status)

vm.close()
```

## Related

* [`SmolVM.snapshot()`](/smolvm/api/smolvm#snapshot) — Create a snapshot from a running VM
* [`SmolVM.from_snapshot()`](/smolvm/api/smolvm#from-snapshot) — Restore a VM from a snapshot
* [Snapshots guide](/smolvm/features/snapshots) — Step-by-step guide to using snapshots
* [Exceptions](/smolvm/api/exceptions) — `SnapshotAlreadyExistsError` and `SnapshotNotFoundError`
