VM Snapshot Management

Overview

Snapshot: A snapshot is a point-in-time capture of data status in a disk. Before performing business-sensitive operations, you can create a snapshot at specified time points to record the state of the system disk and data disks of a virtual machine. This allows for quick rollback in case of breakdowns.

Snapshot Types

  • Manual Snapshot: Users can manually create a snapshot of the entire virtual machine at any time. For more information, see Snapshot Basic Operations.
  • Scheduled Snapshot: The system automatically executes snapshots at specified times according to a snapshot policy. For more information, see Snapshot Policy Basic Operations.
  • Automatic Snapshot: The system triggers one-time automatic snapshots in specific scenarios, including system reset and virtual machine cloning. When creating an image, a temporary snapshot is automatically created and will be automatically deleted once the image creation is complete.

Scenarios

  • Fast recovery from breakdowns: If the production environment breaks down, you can rollback snapshots to return to the normal state. Snapshot rollback is a temporary use for unexpected breakdowns. To backup data for a long term, we recommend that you use the Backup Service.
  • Data exploration: You can create snapshots for production data and use the snapshots to do data mining, query, and development and test.
  • Fault tolerance improvement: Before you perform a business-sensitive operation such as upgrading your system or migrating data, we recommend that you create one or more snapshots. This allows fast recovery to the normal state in case of any errors or exceptions during the operation.

Snapshot Basic Operations

Create a Snapshot

You can create one or more snapshots for a virtual machine to retain its temporary state at a specific point in time, allowing for quick rollback in case of a fault.

Before you begin

  • To create a snapshot, make sure the virtual machine does not have any shared disks attached.
  • You cannot take memory snapshots for virtual machines using distributed storage.
  • You cannot take memory snapshots for virtual machines in the Compatible CPU mode.
  • To create a memory snapshot, make sure the virtual machine is in the running state and any attached peripheral devices are detached from the virtual machine.
  • Excessive snapshots will lower the VM performance, increase data security risks, and occupy data storage space. For long-term data backup, you can use the backup service.

Procedure

  1. In the navigation pane, choose Inventory > VM and Host.
  2. Select a target VM and click Actions > Snapshot and Image > Create Snapshot.
  3. In the Create Snapshot dialog, set the following parameters:
    • Name: Enter a name for the snapshot.
    • Description: Enter a brief description for the snapshot.
    • Memory Snapshot: A memory snapshot captures the real-time state of a virtual machine.
  4. Review the configuration and click OK.
    Note: To ensure memory consistency, the virtual machine will be briefly paused during memory snapshot creation.

Revert to a Snapshot

Reverting a VM to the selected snapshot overwrites the existing data.

Procedure

  1. In the navigation pane, choose Inventory > VM and Host.
  2. Select a target VM and click Snapshot.
  3. On the Snapshot tab, select a snapshot point and click Revert.
  4. In the Revert Snapshot? dialog, set the following parameters:
    • Recovery Method: Support full recovery and custom recovery
      • Full Recovery: A full recovery restores both the VM data and disk sequence, which may attach the previously detached disks or detach existing disks.
      • Custom Recovery: Select disks for recovery. During recovery, only data from the selected disks is restored, but the disk sequence is not restored.
        Note: If a disk in the snapshot has been detached, it is currently not supported for recovery.
    • Power Status: Choose whether to automatically power on the virtual machine after reverting the snapshot.
  5. Review the configuration and click OK.
    Note:
    • Reverting a VM to the selected snapshot automatically powers off the VM and overwrites the existing data.
    • If the number of NICs or CD/DVD drives differs from the snapshot configuration, any removed NICs or CD/DVD drives after the snapshot creation will be attached, and any newly added ones after the snapshot creation will be removed.
    • When restoring a memory snapshot, if the memory snapshot contains IP or MAC addresses that are currently in use by other VMs, resolve conflicts before restoring the snapshot.
      If you force revert, the platform will handle conflicts as follows:
      • Conflicting IP addresses: Keeps the IP addresses from the snapshot and you need to manually modify these IP addresses after restoration.
      • Conflicting MAC addresses: Keeps the MAC addresses from the snapshot but disables affected NICs after restoration.

New Virtual Machine from Snapshot

You can create a new virtual machine directly from a snapshot. This recovery method does not overwrite the existing virtual machine.

Before you begin

  • Make sure the virtual machine has at least one successfully generated snapshot.
  • Make sure the platform has sufficient compute, storage, and network resources to support the new virtual machine.
  • You cannot create a new virtual machine if the selected snapshot is a memory snapshot.

Procedure

  1. In the navigation pane, choose Inventory > VM and Host.
  2. Select a target VM and click Snapshot.
  3. On the Snapshot tab, select a snapshot point and click New Virtual Machine.
  4. In the New Virtual Machine from Snapshot dialog, set the following parameters:
    Snapshot Information
    • Snapshot: Display the selected snapshot.
    Basic Information
    • Name: Name of the virtual machine.
    • Quantity: Default is 1, modification is not supported.
    • Location: Host or cluster location where the virtual machine resides.
    • OS: Operating system of the virtual machine, including Linux and Windows
    • Power Status: Choose whether to automatically power on the virtual machine after the creation.
    Hardware Information
    • CPU: Support adjusting the total number of cores.
    • Memory: Support adjusting the memory size.
    • Disk: Display the disk configuration recorded in the snapshot. Modification is not supported.
    • NIC: Support adjusting port groups, MAC address, IP address, DNS assignment, and security groups

      You can add a new NIC to the virtual machine by clicking Add NIC. The new NIC allows customization of the network address and features.

  5. Review the configuration and click OK.

What to do next

Some VM configurations require VMTools. After VM creation, it is recommended to install VMTools to enable certain configurations. For more information about VMTools, see Virtual Machine VMTools.

View Snapshot

The platform provides a unified entry point for users to centrally manage all snapshots. Additionally, you can view snapshots of a specific virtual machine on its Snapshot tab.

Procedure

  1. In the navigation pane, choose Data Protection > Snapshot.
  2. The Snapshot page displays snapshot information in a tree-like hierarchical manner and supports sorting by the number of snapshots or by snapshot size.
    • After selecting a specific virtual machine, the details area shows all snapshots under that VM, including snapshot name, capacity, creation time, and available actions.
    • After selecting a specific snapshot under a VM, the details area displays available actions for that snapshot, basic information, and snapshot details.

Delete a Snapshot

Procedure

  1. In the navigation pane, choose Inventory > VM and Host.
  2. Select a target VM and click Snapshot.
  3. On the Snapshot tab, select the snapshot that you want to delete and click Actions > Delete.
  4. Confirm the selected the snapshot information and risk alerts. Click OK.
    Note:
    • Deleting the current snapshot also deletes snapshots on its branch.
    • Deleting the current snapshot consumes I/O bandwidth. Do not restart the management node service at this time.
    • The snapshot data is committed before it is deleted. This process occupies a certain amount of the data storage. If the data storage capacity is insufficient, you might fail to delete the snapshot.

Snapshot Policy Basic Operations

New Snapshot Policy

Associate a snapshot policy to a specified virtual machine to achieve periodic automatic snapshots.

Before you begin

  • A virtual machine can have only one snapshot policy associated. A virtual machine that already has an associated snapshot policy cannot be associated again.
  • If a virtual machine has shared disks or RDM disks attached, it cannot be associated with a snapshot policy.
  • Make sure the virtual machine uses ZCE distributed storage.

Procedure

  1. In the navigation pane, choose Data Protection > Snapshot Policy.
  2. On the Snapshot page, click New Snapshot Policy.
  3. In the New Snapshot Policy dialog, set the following parameters:
    • Name: Name of the snapshot policy.
    • Description: Optional.
    • Scheduled Snapshot Cycle: Set the frequency of snapshot generation. Snapshots will be created according to the specified execution time, including by week and by month. It supports setting more granular snapshot creation times, precise to the minute level.
    • Start Time: Set the time to start executing the snapshot policy
    • End Time: Set the time to stop snapshot policy, including Never and Custom.
    • Retained Snapshots: Set the upper limit for the number of snapshots to be retained, and any excess will be automatically deleted.
    • Associated VM: After associating virtual machines, when the snapshot policy takes effect, the system will automatically create snapshots of the associated virtual machines at the specified time.
  4. Review the configuration and click OK.

Enable/Disable Snapshot Policy

You can flexibly manage the snapshot policy status, including enabling and disabling. After disabled, the system will pause periodic automatic snapshots until you re-enable the policy.

Procedure

  1. In the navigation pane, choose Data Protection > Snapshot Policy.
  2. On the Snapshot Policy page, select the target snapshot and click Actions > Enable/Disable.

Modify Configuration

You can modify the snapshot policy, such as its scheduled snapshot cycle, start and end time, retained snapshots and associated virtual machines.

Procedure

  1. In the navigation pane, choose Data Protection > Snapshot Policy.
  2. On the Snapshot Policy page, select the target snapshot policy and click Actions > Modify Configuration.
  3. In the Modify Configuration dialog, make changes as needed.
  4. Review your changes and click OK.

Delete Snapshot Policy

Procedure

  1. In the navigation pane, choose Data Protection > Snapshot Policy.
  2. On the Snapshot Policy page, select the target snapshot policy and click Actions > Delete.

Snapshots Usage Recommendations

This chapter mainly provides recommendations for using snapshot features in production environments.
  1. In a production environment, it is recommended to keep the number of snapshots per disk to no more than five. Too many snapshots can affect the I/O performance, data security, and data storage capacity of the virtual machine/disk.
  2. In a production environment, to ensure data integrity, it is not recommended to create snapshots for virtual machines with high I/O. When the virtual machine performs high I/O operations internally, creating a snapshot for the virtual machine means that some data in memory has not yet been written to the disk, and this part of the data will not be saved in the snapshot.
  3. Explanation of the storage capacity occupied by snapshots:
    • In local storage or centralized storage scenarios, creating incremental snapshots occupies minimal storage space, while creating full snapshots occupies double the storage space.
    • In distributed storage scenarios, creating a snapshot does not occupy additional storage space by itself, but after creating a snapshot, writing operations to the original disk may trigger Copy-On-Write (COW) for the snapshot, resulting in each snapshot consuming the same amount of storage space as the original disk.
  4. Before performing a snapshot rollback operation, it is strongly recommended to create a snapshot for the disk to protect the current state of the disk data.
  5. Explanation of the impact of creating a snapshot on current operations:

    Generally, there is no impact, but when creating a full snapshot, there may be additional network I/O generated on the storage network, especially in local storage or centralized storage scenarios, where the disk I/O bandwidth is significantly affected, but disk IOPS are largely unaffected.

  6. Explanation of the impact of deleting a snapshot on current operations:

    Generally, deleting a snapshot also deletes snapshots on its child branches and merges the data into the disk, which can generate additional disk I/O bandwidth, causing the business I/O to potentially slow down slightly.