# snapshot-vm

Create a snapshot of a VM instance and save it as a flexi image. This command allows you to capture the state of a VM instance at a specific point in time and use it as a flexi image for future deployments.

## Usage

```
cldkctl flexi-image snapshot-vm [flags]
```

## Aliases

```
snapshot-vm, snapshot-vm
```

## Steps

Follow the steps below to run and view the result of this command:

1. Run the following command in your terminal:

```
cldkctl flexi-image snapshot-vm 
```

2. Select the **billing type**.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2FYhoOvYvwRm0vulfFWt7C%2Fimage.png?alt=media&#x26;token=04f17570-00ce-4ffc-9d8d-746d023f9f91" alt=""><figcaption></figcaption></figure>

3. Select the **instance** for which you want to create the snapshot.
4. Enter the **snapshot name**.
5. Confirm the snapshot creation by selecting **Confirm**.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2F82HT6OWX9WnzieP9oI9h%2Fimage.png?alt=media&#x26;token=caf969c2-ab33-45d0-b200-491b7ca37f4c" alt=""><figcaption></figcaption></figure>

6. Once completed successfully, the terminal displays the success message.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2FZvomfAcST4kcr9UowZ1l%2Fimage.png?alt=media&#x26;token=998cf311-94eb-46f9-b8dc-e2ea5650631f" alt=""><figcaption></figcaption></figure>

## Flags

{% hint style="info" %}
This command supports [global flags](https://docs.cloudeka.ai/cloudeka-api-list/global-flags). Refer to the Global Flags section for details
{% endhint %}

| Flag       | Description                       |
| ---------- | --------------------------------- |
| -h, --help | Help for the snapshot-vm command. |
