10.12. Snapshots
10.12.1. Creating a Snapshot of a Virtual Machine
Summary
A snapshot is a view of a virtual machine's operating system and applications on any or all available disks at a given point in time. Take a snapshot of a virtual machine before you make a change to it that may have unintended consequences. You can use a snapshot to return a virtual machine to a previous state.
Note
Live snapshots can only be created for virtual machines running on 3.1-or-higher-compatible data centers. Virtual machines in 3.0-or-lower-compatible data centers must be shut down before a snapshot can be created.
Procedure 10.43. Creating a Snapshot of a Virtual Machine
- Click the Virtual Machines tab and select a virtual machine.
- Click to open the Create Snapshot window.
- Enter a description for the snapshot.
- Select Disks to include using the check boxes.
- Use the Save Memory check box to denote whether to include the virtual machine's memory in the snapshot.
- Click to create the snapshot and close the window.
Result
The virtual machine's operating system and applications on the selected disk(s) are stored in a snapshot that can be previewed or restored. The snapshot is created with a status of Locked, which changes to Ok. When you click on the snapshot, its details are shown on the General, Disks, Network Interfaces, and Installed Applications tabs in the right side-pane of the details pane.
10.12.2. Using a Snapshot to Restore a Virtual Machine
Summary
A snapshot can be used to restore a virtual machine to its previous state.
Procedure 10.44. Using a snapshot to restore a virtual machine
- Click the Virtual Machines tab and select a virtual machine.
- Click the Snapshots tab in the details pane to list the available snapshots.
- Select a snapshot to restore in the left side-pane. The snapshot details display in the right side-pane.
- Click the drop-down list beside to open the Custom Preview Snapshot window.
- Use the check boxes to select the VM Configuration, Memory, and disk(s) you want to restore, then click . This allows you to create and restore from a customized snapshot using the configuration and disk(s) from multiple snapshots.The status of the snapshot changes to
Preview Mode. The status of the virtual machine briefly changes toImage Lockedbefore returning toDown. - Start the virtual machine; it runs using the disk image of the snapshot.
- Click Commit to permanently restore the virtual machine to the condition of the snapshot. Any subsequent snapshots are erased.Alternatively, click the Undo button to deactivate the snapshot and return the virtual machine to its previous state.
Result
The virtual machine is restored to its state at the time of the snapshot, or returned to its state before the preview of the snapshot.
10.12.3. Creating a Virtual Machine from a Snapshot
Summary
You have created a snapshot from a virtual machine. Now you can use that snapshot to create another virtual machine.
Procedure 10.45. Creating a virtual machine from a snapshot
- Click the Virtual Machines tab and select a virtual machine.
- Click the Snapshots tab in the details pane to list the available snapshots for the virtual machines.
- Select a snapshot in the list displayed and click to open the Clone VM from Snapshot window.
- Enter the Name and Description of the virtual machine to be created.
- Click to create the virtual machine and close the window.
Result
After a short time, the cloned virtual machine appears in the Virtual Machines tab in the navigation pane. It appears in the navigation pane with a status of Image Locked. The virtual machine will remain in this state until Red Hat Enterprise Virtualization completes the creation of the virtual machine. A virtual machine with a preallocated 20 GB hard drive takes about fifteen minutes to create. Sparsely-allocated virtual disks take less time to create than do preallocated virtual disks.
When the virtual machine is ready to use, its status changes from
Image Locked to Down in the Virtual Machines tab in the navigation pane.
10.12.4. Deleting a Snapshot
Delete a virtual machine snapshot and permanently remove it from your Red Hat Enterprise Virtualization environment. In data centers with a compatibility version of 3.5 and above and hosts running Red Hat Enterprise Linux 7.1 and above or Red Hat Enterprise Virtualization Hypervisor 7.1 and above, you can delete snapshots from a running virtual machine. This operation does not affect the current state of the virtual machine. Alternatively, shut down the virtual machine before continuing.
Important
When you delete a snapshot from an image chain, one of three things happens:
- If the snapshot being deleted is contained in a RAW (preallocated) base image, a new volume is created that is the same size as the base image.
- If the snapshot being deleted is contained in a QCOW2 (thin provisioned) base image, the volume subsequent to the volume containing the snapshot being deleted is extended to the cumulative size of the successor volume and the base volume.
- If the snapshot being deleted is contained in a QCOW2 (thin provisioned), non-base image hosted on internal storage, the successor volume is extended to the cumulative size of the successor volume and the volume containing the snapshot being deleted.
The data from the two volumes is merged in the new or resized volume. The new or resized volume grows to accommodate the total size of the two merged images; the new volume size will be, at most, the sum of the two merged images. To delete a snapshot, it is recommended that you have sufficient free storage space to accommodate the snapshot being deleted and the subsequent snapshot. For detailed information on snapshot deletion for all disk formats, see https://access.redhat.com/solutions/527613.
Procedure 10.46. Deleting a Snapshot
- Click the Virtual Machines tab and select a virtual machine.
- Click the Snapshots tab in the details pane to list the snapshots for that virtual machine.
- Select the snapshot to delete.
- Optionally shut down the running virtual machine associated with the snapshot to be deleted.
- Click .
- Click .




