Managing Apache CloudStack Snapshots

Managing Apache CloudStack Snapshots

In order to create a restore point before making any changes on your instance, you can create a copy of the entire disk (Disk Snapshot) or an increment point (VM snapshot) to revert changes made after the snapshot point.

To take a Disk Snapshot, make sure the instance is stopped preventing any changes to the disk during snapshot creation.

To take a VM Snapshot, the instance needs to be in Running state. The snapshot creation job will only pause the current process threads to create an increment and save the in-memory data on disk.

Creating a Disk Snapshot

Disk Snapshot is a full copy of the selected volume. The copy is stored on the secondary storage space linked to your domain.

Make sure that the instance is in Stopped state before creating a disk snapshot. The option to create a Snapshot in the Volume page is only visible when the instance is stopped.

  1. From the left menu in CloudStack panel choose Storage > Volumes, click on the volume.
  2. From the top right options, click Take Snapshot.
    69960033
  3. Enter a name for the snapshot and confirm by clicking OK.
  4. Disk snapshots are visible under Storage > Snapshots, from the left menu.

Creating a VM Snapshot

VM Snapshot is an increment on the existing volume, saving changes after the snapshot point in a different location on the same image file. This type of snapshot increases the underlying image file which is used to allocated disk space by the instance from.

  1. From the left menu in the CloudStack portal choose Compute > Instances, click on the instance.
  2. From the top right options, click Take VM Snapshot.
    69960032
  3. Enter a name for the snapshot, enable snapshot memory and confirm by clicking OK.
  • Snapshot memory
    • VM snapshots on QEMU/ KVM are always with in memory data. The option to disable storing in memory data is not possible, thus snapshot memory option enabled is required.
  • Quiesce VM
    • QEMU/ KVM will pause the instance CPU threads preventing any changes during creation of VM snapshot to the memory or disk. Therefore, the option to manage quiesce is not applicable for this platform.
  1. VM snapshots are visible under Storage > VM Snapshots, from the left menu.

Creating a Template from a Snapshot

A snapshot of a volume can also be used to create a template, allowing you to spin up new instances with the same data content. By making the template Public, it will be available to other user accounts under your domain in CloudStack.

  1. From the left menu in the CloudStack panel choose Storage > Snapshots, click on the snapshot.
  2. From the top right options click Create template.
    69960026
  3. Enter below information and click OK.
Field NameDescription
NameEnter the name using which you can identify the template. This is an editable field.
DescriptionEnter a description for the template. This is an editable field.
OS TypeSelect the operating system of the template that you want to create.
PublicSelect this check box to make this template available to the community. Any user on the platform can access it. Once made public, you cannot revert the state.
FeaturedShowing the template under featured tab in the instance creation wizard in CloudStack panel
Dynamically ScalableThis feature is not supported for QEMU/ KVM, therefor it should be disabled always. 
HVMHyper-V mode could be enabled for Windows templates, but for Linux make sure this is disabled to prevent performance issues with instances running from this template.
Password EnabledSelect this check box if you want your template to have the capability of resetting password. Note: If you select this check box, the Reset Password icon will appear for the instance. In order to have this capability, your template must have the “cloud-set-guest-password” script file. If you are configuring the template yourself, you can download the “cloud-set-guest-password” script file here

Creating a Volume from a Snapshot

You cannot directly copy a volume. You can create a snapshot of the volume and create a volume of that snapshot. Total capacity of the volumes you can create should be within the limits of resource pack configured for you.

  1. From the left menu in the CloudStack panel choose Storage > Snapshot, click on the snapshot.
  2. From the top right options click Create Volume.
    69960025
  3. Enter a name for the volume and click OK.
  4. After the volume is created you can find it under Storage > Volumes.