Administrators and users of the platform can create snapshots of virtual machines (VMs) before performing any risky actions. For example, testing software, changing the configuration of the OS, etc.

The snapshot saves the current state of RAM and disks of the VM and allows you to return to this state when needed. Multiple snapshots can be created for each VM.

The current version of the platform supports snapshots in clusters with KVM virtualization and one of the following storage types:

  • file storage;
  • local LVM;
  • network LVM;
  • NAS.

Creating snapshots in Ceph storages is not supported.

Features


Differences between snapshots and backups

The main purpose of backups is to save the data of the virtual machine, and the snapshots — the current state of the VM. Creating a backup takes some time, during which the state of a VM can change. The system configuration is "frozen" when the snapshot is created. This allows you to save not only the files, but also the state of the VM.

It is recommended to create snapshots if you need to keep the state of the VM for a short time. If you want to save VM data for a long period of time, use backups.

Storing snapshots

The method of storing snapshots depends on the type of storage used:

  • file storage and NAS — snapshots are stored in the same file as the original VM;
  • local and network LVM — a separate LV is created for each snapshot.

If you delete a VM, its snapshots will be deleted.

A limit on the number of snapshots is set for each VM. If the limit is reached, you must delete the old snapshots before creating new ones.

Migration

The following migration options are supported for VMs with snapshots:

  • from one node with a file storage to another node with a file storage;
  • from one node with a network LVM storage to another node with a network LVM storage.

In other cases, it is necessary to delete the snapshots before migration.

"Live" migration of VMs with snapshots is not supported. You must stop the VM before you migrate.

Changing the VM configuration

If a VM has snapshots created, its configuration cannot be changed.

VM cloning

When cloning a VM with snapshots, a clone will be created without snapshots of the original VM.

Managing snapshots


Snapshot creation settings

In the settings for snapshots you can:

  • allow users to work with snapshots;
  • set the maximum number (limit) of snapshots for a VM. The default setting is 3;
  • allow the RAM state to be saved. This feature is disabled by default.

    The RAM state can only be saved for the enabled VM.

To specify settings for new VMs, specify them in configurations:

  1. Enter TemplatesVM configurations tab → select the configuration.
  2. Under Snapshot settings, click Edit.
  3. If the user should have the ability to work with snapshots, enable the Allow users to work with VM snapshots option.
  4. If you need to save the RAM state for snapshots, enable the Allow saving RAM status option.
  5. Set the VM snapshot limit.
  6. Click Save.

To configure settings for created VMs:

  1. Enter Virtual machines → select the VM → click Parameters.
  2. Open VM snapshots Settings tab.
  3. If the user should have the ability to work with snapshots, enable the Allow users to work with VM snapshots option.
  4. If you need to save the RAM state for snapshots, enable the Allow saving RAM status option.
  5. Set the VM snapshot limit.
  6. Click Apply settings.

    Changing the settings will not affect snapshots you have already created. For example, if three snapshots were created for a VM, and the limit was lowered to two, the created snapshots will be saved.

Creating a snapshot

  1. Enter Virtual machines → select the VM → menu → Create a snapshot.
  2. If necessary, edit the Snapshot name. By default, snapshot names contain the date and time of creation.
  3. If necessary, enable the Save RAM status option.
  4. Add a discretionary Comment.
  5. Click Save.

If snapshots are created for a VM, an icon appears next to its name in the VM table.

Managing snapshots

To manage snapshots of all VMs, enter Virtual machinesVM snapshots tabs → select the VM → menu.

Possible actions with snapshots:

  • Restore VM from a snapshot;
  • Edit — change the snapshot name and commentary;
  • Delete.

To manage the snapshots of an individual VM, enter Virtual machines → select the VM → click Parameters → open VM snapshots Snapshot tree tab.

The tree shows the hierarchical structure of the snapshots and the current state of the VMs. When you select a snapshot in the tree, a brief information about the snapshot is displayed on the right side of the window.

Possible actions with the snapshot tree:

  • Restore VM from a snapshot;
  • Edit — change the snapshot name and commentary;
  • Delete;
  • Delete all.

The VM will be stopped for the time of recovery from the snapshot.

If the file storage ran out of free space while the snapshot was being created, you will not be able to work with the created snapshot. To delete this snapshot:

  1. Connect to the cluster node via SSH.
  2. Free up space on the server equal to the RAM size of the virtual machine for which the snapshot was created.
  3. Remove the snapshot with the "Unavailable" status from the platform interface.