A snapshot is a replica of a VM as it was when you took the snapshot. A snapshot saves VM settings and disk data, and can be used for VM recovery. You can create a snapshot for a VM for VM recovery when application software and VM OS incompatibility occur because of new application software installation, VM OS upgrade, or application software upgrade. To create a snapshot policy that takes effect periodically on multiple VMs, see "Add a snapshot policy."
You can create either internal or external snapshots for a VM. If a VM has an internal snapshot, you cannot create external snapshots for it, and vice versa.
When you create a snapshot for a VM, the system sets the allocated clusters in the disk of the VM to read-only state to indicate that these clusters have been referenced by the snapshot. Before writing new data into a cluster, the system copies the data in the cluster to a new cluster, and subsequent edits will be executed in the new cluster. Internal snapshots are stored in the disk files of VMs. Therefore, if the disk file of a VM is corrupted or deleted, the snapshot data will be lost.
Deleting internal snapshots releases disk space. As a best practice to save disk space, do not create too many snapshots for a VM. When necessary, you can delete some snapshots to release disk space.
When you create a snapshot for a VM, the system sets the disk of the VM to read-only state and creates an incremental image file for the VM. Subsequent edits to the VM's disk will be executed in the incremental image file. When you create a snapshot for the VM again, the system sets both the original disk and the incremental image file of the VM to read-only state and creates a new incremental image file for the VM to form an image chain. External snapshots store only incremental data, so they do not affect the VM services and are applicable to VMs with frequent service changes.
Deleting external snapshots for a VM does not affect the VM or other snapshots of the VM. When you delete an external snapshot of a VM, the image files of the VM are merged. The data stored in the incremental image file created after the snapshot is taken will be written into the upper-level image file. As a best practice to avoid long image chains, do not create too many snapshots for a VM. When necessary, you can delete some snapshots to consolidate the image chain and improve VM performance.
After you create or restore external snapshots multiple times for a VM, redundant incremental image files might exist, for example, the incremental image file that is not merged into the upper-level image file after you delete the associated external snapshot. To prevent redundant incremental image files from affecting VM performance, you can consolidate the image chain of the VM to merge the images and increase the disk read speed. After you consolidate the image chain of the VM, incremental image files will be merged into their upper-level images on the premise that data dependency is not affected.
Figure-1 Image chain
As a best practice, do not use snapshots for VM backup.
Creating snapshots for a VM will increase the disk file size of the VM. Make sure the storage pool on which the image file of the target VM is saved has sufficient space.
The time when a snapshot is actually created might be later than the time when you create the snapshot because of the execution mechanism of the management platform.
You can create multiple snapshots for a VM. As a best practice to save disk space and avoid long image chains, do not create too many snapshots for a VM. When necessary, you can delete some snapshots to release disk space or improve VM performance.As a best practice, do not keep external snapshots for longer than 72 hours.
To create an internal snapshot for a VM, make sure the disk format of the VM is an image file in qcow2 format or RBD. VMs that use RBDs as disks do not support online memory snapshots.
When you create an external snapshot for a VM, only dependent disks are included in the snapshot.
As a best practice to avoid VM restoration failure, do not edit VM settings during the snapshot creation or VM restoration process.
Taking a snapshot for a VM does not replicate the GPU configuration. When you restore a VM from a snapshot, GPU configuration is not restored.
When you take a snapshot of a running VM, the VM will be suspended temporarily. You cannot operate the VM during the VM suspension.
You cannot create a memory snapshot for a VM if live VM migration, CAStools upgrade, CPU hot add, VM reboot, VM hibernation, or VM shutdown is in progress.
On the top navigation bar, click Resources.
From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.
Click Snapshot. The VM Snapshot Management dialog box opens.
Click Create.
Enter the snapshot name and description and select a snapshot type.
If the VM is in running or suspended state, you can specify whether to include memory state in the snapshot. For internal snapshots, you can set the snapshot creation timeout. For more information, see "Parameters."
Click OK.
On the top navigation bar, click Resources.
From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.
Click Snapshot. The VM Snapshot Management dialog box opens.
From the VM snapshot tree, select a snapshot, and then click Edit.
Enter the snapshot name and description.
Click OK.
On the top navigation bar, click Resources.
From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.
Click Snapshot.
From the VM snapshot tree, select a snapshot, and then click Restore.
In the dialog box that opens, click OK.
On the top navigation bar, click Resources.
From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.
Click Snapshot.
From the VM snapshot tree, select one or multiple snapshots, and then click Delete.
To delete an external snapshot, select the target snapshot from the snapshot tree, click Delete, specify a maximum deletion rate in the dialog box that opens, and then click OK.
In the dialog box that opens, click OK.
You can set the deletion rate and cancel the deletion of an external snapshot. To cancel the deletion of an external snapshot, right click the external snapshot deletion task on the task console, and then click Cancel Task. |
On the top navigation bar, click Resources.
From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.
Click Snapshot.
Click Consolidate Image Chain.
In the dialog box that opens, click OK.
Memory Snapshot: Whether to include VM memory in the snapshot.
Snapshot Type: Select a snapshot type.
Timeout: Timeout for taking internal snapshots. If snapshot creation is not finished within this timeout, the system suspends the VM and resumes the VM after snapshot creation is finished.