Skip to main content

Managing Snapshots in Hyper-V

Taking snapshots

Taking a snapshot is a very easy process. Just remember a few considerations first.

1. Make sure the disk that is holding the virtual machine (VM) folder has the disk space for a snapshot.

2. Make sure the VM is either running, or shutdown. You cannot take a snapshot while the VM is paused.

3. Snapshots are not supported in a production environment. Snapshots are good for lab or test environments.

4. Snapshots are not a replacement for regular backups.

You can take a snapshot in one of two ways; you can right click a VM in Hyper-V Manager and select Snapshot. Your other option is to click on the VM in Hyper-V Manager and click Snapshot from the VM specific menu in the lower left hand corner of the Hyper-V Manager.

clip_image001

It will take several seconds for the snapshot to appear in the Snapshots window.

 
 
Reverting snapshots

Snapshots make it very easy to go back to a point-in-time. You can easily reset a VM back to its current snapshot by doing a Revert. To Revert a VM, right click the VM in Hyper-V Manager. Click Revert.

clip_image002

This will make the VM fall back to the last Snapshot taken or the last snapshot applied, whichever is the case.

 
 
merging snapshots

Merging a snapshot is the result of deleting a snapshot from Hyper-V. To merge a snapshot into its parent, right click the snapshot to delete and select Delete Snapshot Subtree. Click Delete when prompted.

clip_image003

A word of caution on this procedure. Take a look at the example below:

clip_image004

If I were to merge the snapshot label VTEC1 with its parent Network Base 1, the results would be catastrophic for the snapshots 6416C – AD Recycle Bin and 6420 No DHCP. That is because differencing disks are used for snapshots. All three snapshots in questions are children of Network Base 1. By merging VTEC1 into Network Base 1, I make the other two snapshots unusable.

Perform this procedure with caution.

 
 
Deleting snapshots

From time to time it is good practice to remove snapshots that you no longer need. This will help to conserve on disk space and help to make the VM more portable.

In Hyper-V Manager, right click the snapshot you want to delete and click Delete Snapshot.

clip_image005

Then click Delete when prompted.

The Snapshot will be removed from the list and the disk.
 
 
Applying snapshots;

Applying a snapshot is very easy to do. You can apply a snapshot with the VM running or turned off. In Hyper-V Manager, you apply a snapshot in one of two ways. Right click the snapshot and Click Apply or click the Snapshot and click Apply from the VM menu on the lower left.

clip_image007

Hyper-V will asked you if you want to just apply the Snapshot or if you want to take one of the current machine state before applying the snapshot you selected.

clip_image008

The VM will now be configured to that snapshot.

Comments

Popular posts from this blog

How to list all the AD LDS instances on a server

AD LDS allows you to provide directory services to applications that are free of the confines of Active Directory.  To list all the AD LDS instances on a server, follow this procedure: Log into the server in question Open a command prompt. Type dsdbutil and press Enter Type List Instances and press Enter . You will receive a list of the instance name, both the LDAP and SSL port numbers, the location of the database, and its status.

How to run GPResult on a remote client with PowerShell

In the past, to run the GPResult command, you would need to either physically visit this client, have the user do it, or use and RDP connection.  In all cases, this will disrupt the user.  First, you need PowerShell remoting enabled on the target machine.  You can do this via Group Policy . Open PowerShell and type this command. Invoke-Command –ScriptBlock {GPResult /r} –ComputerName <ComputerName> Replace <ComputerName> with the name of the target.  Remember, the target needs to be online and accessible to you.

Error icon when creating a GPO Preference drive map

You may not have an error at all.  Take a look at the drive mapping below. The red triangle is what threw us off.  It is not an error.  It is simply a color representation of the Replace option of the Action field in the properties of the drive mappings. Create action This give you a green triangle. The Create action creates a new mapped drive for users. Replace Action The Replace action gives you a red triangle.  This action will delete and recreate mapped drives for users. The net result of the Replace action is to overwrite all existing settings associated with the mapped drive. If the drive mapping does not exist, then the Replace action creates a new drive mapping. Update Action The Update action will have a yellow triangle. Update will modify settings of an existing mapped drive for users. This action differs from Replace in that it only updates settings defined within the preference item. All other settings remain as configured on the ma...