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.
From the left menu in CloudStack panel choose Storage > Volumes, click on the volume.
From the top right options, click Take Snapshot.
- Enter a name for the snapshot and confirm by clicking OK.
- 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.
- From the left menu in the CloudStack portal choose Compute > Instances, click on the instance.
- From the top right options, click Take VM Snapshot.
Enter a name for the snapshot, enable snapshot memory and confirm by clicking OK.
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.
QEMU/ KVM will pause the instance cpu threads preventing any changes during creation of VM snapshot to the memory or disk. Therefor, the option to manage quiesce is not applicable for this platform
- 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.
- From the left menu in the CloudStack panel choose Storage > Snapshots, click on the snapshot.
- From the top right options click Create template.
Enter below information and click OK.
Field Name Description Name Enter the name using which you can identify the template. This is an editable field. Description Enter a description for the template. This is an editable field. OS Type Select the operating system of the template that you want to create. Public Select 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. Featured Showing the template under featured tab in the instance creation wizard in CloudStack panel Dynamically Scalable This feature is not supported for QEMU/ KVM, therefor it should be disabled always. HVM Hyper-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 Enabled Select 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.
- From the left menu in the CloudStack panel choose Storage > Snapshot, click on the snapshot.
- From the top right options click Create Volume.
- Enter a name for the volume and click OK.
- After the volume is created you can find it under Storage > Volumes.