# How to create an instance snapshot

Source: https://docs.quake.ai/docs/compute/how-to/create-snapshot
Markdown: https://docs.quake.ai/docs/compute/how-to/create-snapshot.md

---

# How to create an instance snapshot

Create a point-in-time snapshot of a running instance. Snapshots are stored as images and can be used to launch new instances or create golden images for repeatable deployments.

<PrerequisiteBlock methods={["console", "cli", "api"]}>

Snapshots count against your project's storage quota. Ensure you have enough free storage; for example, a 10 GB volume instance requires approximately 10 GB of free quota.

</PrerequisiteBlock>

## Before you begin

Some base images require updates before a snapshot can be created successfully. If you are using the shared Ubuntu 22.04 image, see [Update Ubuntu 22.04 for snapshots](/docs/operate/troubleshooting/ubuntu-22-snapshots) before proceeding.

## Create the snapshot

<MethodTabs>
<Method label="Console">

1. Go to **Compute** > **Instances** to view your instances.
2. Find the instance you want to snapshot. On its row, open the **Volumes** icon dropdown and select **Create Snapshot**. This opens the **Create Instance Snapshot** dialog.
3. Enter a name for the snapshot.
4. Select **OK** to create the snapshot.
5. The new snapshot appears in **Compute** > **Instance Snapshots**.



The Console view often shows the snapshot in `Active` state on first render for small-volume sources; the `queued` and `saving` intermediate states complete faster than the page polls. Run `openstack image show MY_SNAPSHOT_NAME -c status` to observe the progression directly.





the Console exposes two **Create Snapshot** menu items that produce different artifact types:

- The **Volumes** icon on the **Instances** list row (the path above) creates a Glance image (the instance snapshot this page describes).
- A **Create Snapshot** item on the instance detail page's **Volumes** tab creates a per-volume Cinder snapshot instead. For that flow, see [How to create a volume snapshot](/docs/block/how-to/create-snapshot).



</Method>
<Method label="CLI">

```bash
openstack server image create \
  --name MY_SNAPSHOT_NAME \
  MY_INSTANCE_NAME
```

Replace `MY_SNAPSHOT_NAME` with a descriptive name and `MY_INSTANCE_NAME` with the instance name or ID.

The command returns immediately. The snapshot is created asynchronously; check its status with:

```bash
openstack image show MY_SNAPSHOT_NAME -c status
```

The status progresses from `queued` to `saving` to `active` when complete.



For golden images, use a naming convention like `golden-ubuntu2204-v1` to make snapshots identifiable and versioned.



</Method>
<Method label="API">

```bash
curl -X POST "$OS_COMPUTE_URL/servers/SERVER_ID/action" \
  -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "createImage": {
      "name": "MY_SNAPSHOT_NAME"
    }
  }'
```

The response includes an `image_id` header pointing to the new image. Check its status:

```bash
curl -s "$OS_IMAGE_URL/v2/images/IMAGE_ID" \
  -H "X-Auth-Token: $OS_TOKEN" | python3 -m json.tool
```




```python
import openstack

conn = openstack.connect(cloud="rumble")

server = conn.compute.find_server("MY_INSTANCE_NAME")
image_id = conn.compute.create_server_image(server, "MY_SNAPSHOT_NAME")

image = conn.image.wait_for_status(
    conn.image.get_image(image_id),
    status="active",
)
print(f"Snapshot ready: {image.id}")
```




</Method>
</MethodTabs>

## Use a snapshot to create a golden image

A golden image is a baseline image configured to your standards that you reuse to launch other instances.

1. [Create a new instance](/docs/compute/how-to/create-vm-public-network) from a base image.
2. Update and configure the instance as needed (packages, security hardening, application setup).
3. Create a snapshot using any method above. Use a descriptive name like `golden-ubuntu2204-v1`.

The snapshot is now available as an image source when creating new instances.

## Create a new instance from a snapshot

<MethodTabs>
<Method label="Console">

1. Go to **Compute** > **Instance Snapshots**.
2. Find the snapshot you want to use. The row exposes three per-row action icons: **Instances**, **Volumes**, and **Settings**.
3. Open the **Instances** icon dropdown on the snapshot's row and select **Create Instance** to launch a new instance from the snapshot.

Alternatively, when [creating a new instance](/docs/compute/how-to/create-instance), select **Instance Snapshot** as the **Start Source** and choose your snapshot.

</Method>
<Method label="CLI">

```bash
openstack server create \
  --image MY_SNAPSHOT_NAME \
  --flavor YOUR_FLAVOR \
  --network YOUR_NETWORK \
  --key-name YOUR_KEY \
  my-new-instance
```

</Method>
<Method label="API">

```bash
curl -X POST "$OS_COMPUTE_URL/servers" \
  -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "server": {
      "name": "my-new-instance",
      "imageRef": "SNAPSHOT_IMAGE_ID",
      "flavorRef": "FLAVOR_ID",
      "networks": [{"uuid": "NETWORK_ID"}],
      "key_name": "YOUR_KEY"
    }
  }'
```

</Method>
</MethodTabs>

## Verify the result

<MethodTabs>
<Method label="Console">

Navigate to **Compute** > **Instance Snapshots**. The snapshot appears in the list with status **Active**.

</Method>
<Method label="CLI">

```bash
openstack image list --private
```

Your snapshot appears with status `active` and the name you provided.

</Method>
<Method label="API">

```bash
curl -s "$OS_IMAGE_URL/v2/images?name=MY_SNAPSHOT_NAME" \
  -H "X-Auth-Token: $OS_TOKEN" | python3 -m json.tool
```

</Method>
</MethodTabs>

## See also

- [How to back up and restore a Quake AI VM](/docs/compute/how-to/backup-and-restore): snapshot, offsite copy, and restore drill
- [Compute API Reference](/reference/compute): full parameter documentation for the Compute API
- [Instance snapshots concepts](/docs/compute/concepts/snapshots)
- [Instance snapshots console](/reference/compute/console/snapshots)
- [Snapshots CLI reference](/reference/compute/snapshots-cli)
- [Snapshots API reference](/reference/compute/snapshots-api)
- [How to create an instance](/docs/compute/how-to/create-instance)
