A snapshot is a way of making a copy of a disk state so it can be preserved. You can create a snapshot of the root disk of a virtual machine or of volume storage.

Contents

See Training Module 9 for further detail on snapshots.

Instance Snapshots

A snapshot is a way to create a copy of the disk state of your virtual machine (VM).
There are two main reasons you would take a snapshot of your VM:

  1. To back-up the VM set-up - you can restore an instance from the snapshot.
  2. To create a template image which can be used to launch instances which are already set-up.
  3. To relaunch an instance as a new VM with a different flavor  (increased Tech Specs) or in a different Availability Zone.
  4. Share the set-up of a VM with other users (ask the helpdesk to make your snapshot available to another user).

NOTE: The snapshot only creates an image of the primary 'root' disk, not the secondary 'ephemeral' storage or mounted volumes.

The primary 'root' disk is small (5-30GB) and is not suitable for storing significant data. Creating an image of your VM is preserving the computer set-up such as software installation, configurations and profiles. Follow this link for  "Backing up Data".

Creating a Snapshot of an Instance (an Image)

  • Log on to the NeCTAR Dashboard and navigate to the Project -> Compute -> Instances option in the navigation panel.
  • It is not necessary, but good practice, to Pause Instance from the Actions drop down list.
  • Click Create Snapshot from the Actions drop down list.
  • Enter a descriptive name for the Snapshot
  • It will now take some time to create the Snapshot.
  • The snapshotted image will be saved in the Project -> Compute -> Images section.

Launching an Instance from a saved Image

  • On the NeCTAR Dashboard, navigate to Project -> Compute -> Images.
  • Locate the required image in the list of images and click Launch in the Actions list.
  • You can choose a different Flavor (i.e. size) of instance, but it must be large enough to fit the image on the primary root disk.
  • Name the instance and set the availability zone if necessary (e.g. to ensure the same zone as your volume storage).
  • Set the key pair and security groups in the respective tabs,
  • This is just like launching a new instance, except that the new VM will already have the operating system settings, configurations and installations of the original VM.
  • Access as the intance as usual, with the SSH keys and the IP address of the new instance.

NOTE: The new VM will have a new, empty ephemeral disk. This will need to be made writable with the command:
sudo chown ubuntu /mnt

If required, existing volume storage will need to be attached, mounted and made writable also.
On the NeCTAR Dashboard, navigate to Project -> Volumes -> Volumes -> Manage Attachments
Then access the VM command line and enter:

sudo mkdir /volume_name
sudo mount /dev/vdc /volume_name -t auto
sudo chown ubuntu /volume_name

Contributed Images

Snapshot images can be made public or they can be submitted as "Contributed Images". Contributed images are public images that fulfil standard criteria for quality assurance. Information on submitting a contributed image is found here.

Snapshots of Volume Storage

Snapshots can also be made to copy the disk state of your Volume block storage. This is useful for preserving the state of your Volume in an image, in order to create a new Volume from it at a later time. The volume snapshots use up your volume data allocation, for the full size of the volume. Volume snapshots are not designed as a method of backing up data - see data backup suggestions here.

  • On the NeCTAR Dashboard, navigate to Project -> Volumes -> Volumes
  • The volume should be unattached from an instance: Click Manage Attachments in the Actions list, then Detach Volume.
  • Click Create Snapshot in the Actions list.
  • The snapshot will be saved in the Project -> Volumes -> Snapshots section.

  • In the snapshot Actions drop down list, you can click Create Volume to create a new volume from the snapshot. You can also edit the snapshot name and description, or delete the snapshot when it is no longer needed (to recover the volume storage space it uses).