Difference between revisions of "Creating and Managing Hyper-V Snapshots"

From Virtuatopia
Jump to: navigation, search
(Hyper-V Manager Snapshot Trees)
(Managing and Applying Virtual Machine Snapshots)
Line 35: Line 35:
  
 
== Managing and Applying Virtual Machine Snapshots ==
 
== Managing and Applying Virtual Machine Snapshots ==
 +
 +
Once a virtual machine snapshot has been selected from the snapshot tree within the Hyper-V Manager tool, a number of tasks may be performed on that snapshot. These actions are listed both in the lower section of the ''Actions'' panel, or from a menu when right clicking on the snapshot:
 +
 +
<table border="1" cellpadding="5" cellspacing="0" id="E3B" style="border-collapse: collapse; border-color:#cccccc; border-style: solid; border-width: 1px; margin-bottom:20px">
 +
<tr bgcolor="#cccccc" style="color:black" valign="top">
 +
<th>
 +
<p>Action</p>
 +
</th>
 +
<th>
 +
<p>Description</p>
 +
</th>
 +
</tr>
 +
<tr>
 +
<td>Apply</td>
 +
<td>Applies the snapshot to the virtual machine from which it was taken. The virtual machine will revert to the exact state it was in when the snapshot was taken. Any changes made to the virtual machine since the snapshot was will be lost. Hyper-V will provide the option to take a new snapshot of the virtual machine's current state before applying the old snapshot.</td>
 +
</tr>
 +
<tr bgcolor="#e9e9e6">
 +
<td>Rename</td>
 +
<td>Allows the name assigned to the snapshot to be changed.</td>
 +
</tr>
 +
<tr>
 +
<td>Delete Snapshot</td>
 +
<td>Deletes the snapshot and all associated files from the system. This action is irreversible.</td>
 +
</tr>
 +
<tr bgcolor="#e9e9e6">
 +
<td>Delete Snapshot Subtree</td>
 +
<td>Deletes the currently selected snapshot and all other snaphots which are located beneath it in the tree.</td>
 +
</tr>
 +
<tr>
 +
<td>Settings</td>
 +
<td>Allows the settings of the virtual machine at the time of the snapshot to be viewed. Modification of settings is disabled.</td>
 +
</tr>
 +
</table>

Revision as of 20:26, 27 January 2009

In this chapter of Hyper-V Essentials, the creation and management of virtual machine snapshots will be covered.




What is a Hyper-V Virtual Machine Snapshot?

Hyper-V virtual machine snapshots allow the status of a virtual machine (and the guest operating system) at a particular time to be saved such that it can be reverted to that state at any point in the future. Hyper-V snapshots contain both the configuration settings of the virtual machine, and the state of the guest operating system at the point the snapshot is taken. Snapshots may be taken of virtual machines when they are running, stopped or saved. It is not possible, however, to take a snapshot of a paused Hyper-V virtual machine.

When a snapshot is taken of a saved or running virtual machine, the snapshot contains the status of both the file system and the memory used by the gust operating system. As such, when the virtual machine is reverted to the snapshot everything, including applications running at the time the snapshot was taken, will be restored to the snapshot status.

Virtual machines are reverted to a snapshot status by applying the desired snapshot to the virtual machine.


Taking Hyper-V Virtual Machine Snapshots

Snapshots may be taken of a virtual machine using a number of different approaches using either the Hyper-V Manager or the Virtual Machine Connection tool.

From the Virtual Machine Connection tool window click on the Action->Snapshot.. menu option, or click on the snapshot button located in the toolbar. Alternatively, launch the Hyper-V Manager (Start->Administrative Tools->Hyper-V Manager). Once launched, right click on the virtual machine for which the snapshot is to be taken and select Snapshot from the popup menu. Snapshots may also be triggered by selecting the desired virtual machine from the Hyper-V Manager list and clicking on the Snapshot link in the Actions panel.

When a snapshot is taken from the Virtual Machine Connection tool, a dialog will appear while the snapshot is in progress providing the option to give the snapshot a name other than the default name. If no snapshot name is given, or any of the other methods of taking a snapshot are used, the default name of the snapshot will be constructed using the name of the virtual machine combined with the date and time that the snapshot was taken.

Whilst the snapshot is being taken, the Operations entry for the virtual machine will in the Hyper-V Manager will display Taking snapshot together with a percentage value indicating the progress of the snapshot process.

Hyper-V Manager Snapshot Trees

Snapshots taken of virtual machines are presented in Hyper-V Manager in the form of a snapshot tree, with one tree for each virtual machine. Each new snapshot taken of a virtual machine is added to a new level of the tree for that machine. The snapshot tree for a virtual machine appears in the Hyper-V Manager Snapshot panel when the virtual machine is selected from the list. A typical Hyper-V Manager snapshot tree is illustrated in the following figure:


A Hyper-V Manager virtual machine snapshot tree


If the selected virtual machine is currently running, as is the case in the above illustration, an additional tree entry in the form a a green arrow and the word Now represents the currently running virtual machine. Right clicking on this tree item provides options to connect to, or access the settings of the virtual machine.

As each snapshot in a tree is selected, the panel beneath the tree panel will update to display additional information about the snapshot together with a thumbnail screenshot of the virtual machine's console at the point the snapshot was initiated. The following figure shows a typical detail panel for a snapshot:


The Hyper-V Manager snapshot details panel

Managing and Applying Virtual Machine Snapshots

Once a virtual machine snapshot has been selected from the snapshot tree within the Hyper-V Manager tool, a number of tasks may be performed on that snapshot. These actions are listed both in the lower section of the Actions panel, or from a menu when right clicking on the snapshot:

Action

Description

Apply Applies the snapshot to the virtual machine from which it was taken. The virtual machine will revert to the exact state it was in when the snapshot was taken. Any changes made to the virtual machine since the snapshot was will be lost. Hyper-V will provide the option to take a new snapshot of the virtual machine's current state before applying the old snapshot.
Rename Allows the name assigned to the snapshot to be changed.
Delete Snapshot Deletes the snapshot and all associated files from the system. This action is irreversible.
Delete Snapshot Subtree Deletes the currently selected snapshot and all other snaphots which are located beneath it in the tree.
Settings Allows the settings of the virtual machine at the time of the snapshot to be viewed. Modification of settings is disabled.