Questo contenuto non è disponibile nella lingua selezionata.
6.9. Snapshots
6.9.1. Creating a Snapshot of a Virtual Machine
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 restore a virtual machine to a previous state.
Creating a Snapshot of a Virtual Machine
In the VM Portal:
- Open a virtual machine.
In the Snapshots panel, click .
A snapshot is added to the panel, including all attached disks.
In the Administration Portal:
-
Click
. - Click a virtual machine’s name to go to the details view.
- Click the Snapshots tab and click Create.
- Enter a description for the snapshot.
Select Disks to include using the check boxes.
NoteIf no disks are selected, a partial snapshot of the virtual machine, without a disk, is created. You can preview this snapshot to view the configuration of the virtual machine. Note that committing a partial snapshot will result in a virtual machine without a disk.
- Select Save Memory to include a running virtual machine’s memory in the snapshot.
- Click .
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 the snapshot, its details are shown on the General, Disks, Network Interfaces, and Installed Applications drop-down views in the Snapshots tab.
6.9.2. Using a Snapshot to Restore a Virtual Machine
A snapshot can be used to restore a virtual machine to its previous state.
Using Snapshots to Restore Virtual Machines
In the VM Portal:
- Shutdown the virtual machine.
In the Snapshots panel, click the
Restore Snapshot
icon for the snapshot you want to restore.The snapshot is loaded.
In the Administration Portal:
-
Click
and select a virtual machine. - Click the name of the virtual machine to go to the details view.
- Shut down the virtual machine.
- Click the Snapshots tab to list the available snapshots.
- Select a snapshot to restore in the upper pane. The snapshot details display in the lower pane.
- Click the Custom. button and select
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 Locked
before 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.
6.9.3. Creating a Virtual Machine from a Snapshot
You can use a snapshot to create another virtual machine.
Creating a Virtual Machine from a Snapshot
-
Click
and select a virtual machine. - Click the virtual machine’s name to go to the details view.
- Click the Snapshots tab to list the available snapshots.
- Select a snapshot in the list displayed and click Clone.
- Enter the Name of the virtual machine.
- Click .
After a short time, the cloned virtual machine appears in the Virtual Machines tab in the navigation pane with a status of Image Locked
. The virtual machine remains in this state until Red Hat 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
6.9.4. Deleting a Snapshot
You can delete a virtual machine snapshot and permanently remove it from your Red Hat Virtualization environment.
Deleting a Snapshot
In the VM Portal:
- Open a virtual machine.
-
In the Snapshots panel, click the
Delete Snapshot
icon of the snapshot you want to delete.
In the Administration Portal:
-
Click
. - Click the virtual machine’s name to go to the details view.
- Click the Snapshots tab to list the snapshots for that virtual machine.
- Select the snapshot to delete.
- Click Delete.
- Click .
If the deletion fails, fix the underlying problem (for example, a failed host, an inaccessible storage device, or a temporary network issue) and try again.