Sie sind auf Seite 1von 15

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Test Citrix Performance


www.loginvsi.com/test-citrix Test the performance of XenDesktop and XenApp. Try now for Free!
Articles Authors Blogs FAQ Free Tools Hardware Message Boards Newsletter Services Software Tips White Papers

Site Search Advanced Search

Home Articles & Tutorials Microsoft Hyper-V Articles General

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

1 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

How to use the Hyper-V snapshot Revert, Apply and Delete options, understanding how the Revert and Apply options differ and how they can be used to return a virtual machine to a previous configuration and state.

Published: Jun 02, 2009 Updated: Aug 11, 2009 Section: General Author: Janique Carbone Company: Infrastructor Group Printable Version Adjust font size: Rating: 4.6/5 - 23 Votes 1 2 3 4 5

Like

Tweet

22

Hyper-V Snapshot Overview


The Hyper-V snapshot feature allows you to capture the configuration and state of a virtual machine (VM) at any point in time, and return a VM to that state without noticeable interruption. When you take a snapshot of a running VM, Hyper-V briefly pauses the VM to create a new automatic virtual hard disk (AVHD) which is essentially a differencing disk, attaches it to the VM to store changes to the VM data, saves the processor state into a file (.bin), then resumes the VM. Hyper-V also makes a copy of the VM configuration file (.xml), and saves the contents of the VM memory into a file (.vsv). Snapshots can also be created when a VM is turned-off, in which case Hyper-V does not need to capture VM memory or processor state data.

2 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

The Hyper-V snapshot feature is principally for use in test and development environments, not in a production infrastructure. You especially do not want to use snapshots as a recovery mechanism for transactional applications like Microsoft Exchange Server or Active Directory Domain Services. However, snapshots can be extremely useful in scenarios where you need to make incremental changes to a virtual machine with the ability to roll back to a previous state. A VM image build lab, help desk, and application testing lab represent excellent candidates for environments that can heavily leverage Hyper-V snapshots to improve their functional efficiency. You should be aware that there is a limit of 50 snapshots for each virtual machine. By design, if you attempt to create another snapshot once you have reached this limit, you will receive an error reporting that the snapshot has failed.

Creating a Snapshot
Figure 1 shows the Hyper-V Manager console with a single running VM before the creation of the first snapshot. In order to create a snapshot, you just highlight the VM, then right-click and select the Snapshot menu option.

Figure 1: Creating a snapshot in Hyper-V Manager The Hyper-V Manager Snapshots pane displays a tree structure to represents the VM snapshot hierarchy, as shown in Figure 2. The root node of the tree is the first snapshot that was created. Under the root node, there is a child named Now which represents the running version of the VM. By default, snapshots are labeled using the VM name concatenated with the creation timestamp. In order to rename the snapshot, highlight it, then right-click and select Rename from the menu.

3 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Figure 2: Hyper-V Manager Snapshot Pane Display Within a snapshot hierarchy, with each new snapshot that is taken, the active AVHD is detached from the VM, and becomes the parent of a new child AVHD that is attached to the VM and captures changes to the VM data until the next snapshot is created. For more details on the snapshot creation process, you can refer to my previous article, Understanding and Using Microsoft Windows Server 2008 Hyper-V Snapshots, and video, Using Hyper-V Snapshots.

Using the Revert Option


Using the Revert option allows you to return the VM to the state of the last snapshot that was taken. For example, in Figure 3, you can see that three snapshots were captured for the Win2008 VM. Each snapshot was renamed to indicate the order and state of the VM when the snapshot was taken. The VM was running during Snapshot 1 and Snapshot 2, but powered-off for Snapshot 3, and then restarted when Snapshot 3 was completed. The last object in the hierarchy, marked by Now, indicates the running VM.

4 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Figure 3: Hyper-V Manager Snapshot Hierarchy If the Revert option is selected, the configuration and state of the VM are returned to the settings saved in Snapshot 3, since it is the last snapshot that was taken. During the Revert process, the VM is stopped, the current AVHD is deleted, and a new AVHD is created. The VM configuration saved during the snapshot is restored and the name of the new AVHD is updated in the VM configuration file. Because the virtual machine was powered-off when Snapshot 3 was taken, there are no save state files to load and the virtual machine remains powered-off, as shown in Figure 4. It is important to stress that when a Revert is performed, all configuration modifications made to the running VM since the snapshot was taken are discarded. However, you can make changes to the memory, processor, virtual hard disk adapter, or any other VM hardware setting, when the Revert has completed.

5 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Figure 4: Hyper-V Manager View after Revert to Snapshot 3 Another thing to note in Figure 4 is that the snapshot hierarchy view did not change after the Revert was performed. That is expected since none of the snapshots are altered during this operation. However, using the Revert option again will continue to return the VM to the configuration and state of the last snapshot taken. In this sense, the snapshot Revert feature can be thought of as a single-level undo feature. It cannot be used repeatedly to traverse up the snapshot hierarchy. In the current example, if the VM must be returned to the configuration and state of Snapshot 1 or Snapshot 2, the Apply option must be used.

Using the Apply Option


As shown in Figure 5, to return to a snapshot that is higher than one level up from the running VM (represented by the Now marker in the Snapshot pane), you must highlight the snapshot, right-click, and choose the Apply option from the menu. If you did not create a snapshot of the running virtual machine, you are prompted to do so prior to the Apply operation, or you can choose to continue and apply the selected snapshot without saving the current configuration and state. Just as in the case of the Revert option, if you do not take a snapshot prior to the Apply operation, the running virtual machine configuration and state will be lost.

6 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Figure 5: Using the Snapshot Apply Option in Hyper-V Manager The snapshot Apply process is similar to the Revert process. The virtual machine is stopped, the active AVHD is deleted, and a new AVHD is created. The snapshot virtual machine configuration is restored and the name of the new AVHD is updated in the VM configuration file. As shown in Figure 6, the virtual machine is then restarted, and the save state files (.vsv and .bin) are loaded.

Figure 6: Hyper-V Manager Snapshot Hierarchy after Apply of Snapshot 2 You can also see in Figure 6 that the Now marker moved right under Snapshot 2 to indicate that the running VM is
7 of 15 08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

based on Snapshot 2. At this point, if a new snapshot is created, it is placed in the Snapshot 2 hierarchy. After the Apply is performed, Snapshot 2 essentially represents a subtree in the snapshot hierarchy, as shown in Figure 7.

Figure 7: Hyper-V Manager Snapshot Hierarchy with the Snapshot 2 Subtree

Using the Snapshot Delete Option


If you decide that you no longer need a snapshot or snapshot subtree, Hyper-V provides two different Delete options to permanently remove one or more snapshots from the snapshot hierarchy, as shown in Figure 8.

8 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Figure 8: Hyper-V Manager Delete Snapshot and Delete Snapshot Subtree Options Deleting a single snapshot will not affect other snapshots, but it will immediately delete the configuration file and save state files associated with the snapshot. In a snapshot hierarchy, the snapshot AVHD is related to other snapshot AVHDs through a parent-child relationship. Therefore, a snapshot AVHD is only immediately deleted if it is not the parent of a child AVHD. If there is only one child AVHD, it is merged into the parent AVHD the next time that the VM is powered-off. If a parent AVHD has multiple children, then it is retained until only one of the child AVHD remains. The child AVHD is then merged into the parent AVHD the next time that the VM is powered-off. Deleting a snapshot subtree immediately deletes the configuration and save state files associated with all the snapshots in the subtree. If the running virtual machine AVHD is not a child of any snapshot in the subtree, then all of the AVHDs in the subtree will also be deleted. If the running virtual machine AVHD depends on a chain of AVHDs in the subtree that is deleted, then the AVHD chain will be merged into the AVHD that is one level above the deleted subtree, the next time that the VM is powered-off.

Conclusion
a dve r tis e me nt

9 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

The Hyper-V snapshot feature provides the ability to quickly capture and store the configuration and state of a virtual machine at any point in time, and return a virtual machine to that previous configuration and state through a few clicks in the Hyper-V manager. In this article, you learned how the Revert, Apply, and Delete snapshot options can be used to manage a snapshot hierarchy, as well as the process that Hyper-V follows when performing these actions whether in a single snapshot hierarchy or a snapshot hierarchy which contains one or more subtrees.
Tweet 3 3 22

Add a comment...

Post to Facebook Avnish Kumar Chauhan Works at AgreeYa Solutions Very good detailed article. Thanks Reply

Posting as Karan Mishra (Not you?)

3 Like Follow Post 22 September 2012 at 13:12

About Janique Carbone

Janique Carbone has spent the better part of 15+ years in the IT industry, including 7 years at Microsoft as a Senior Consultant and Technical Account Manager. Click here for Janique Carbone's section.

Receive all the latest articles by email!


Get all articles delivered directly to your mailbox as and when they are released on VirtualizationAdmin.com! Choose between receiving instant updates with the Real-Time Article Update, or a monthly summary with the Monthly Article Update. Sign up to the VirtualizationAdmin.com Monthly Newsletter, written by Scott D. Lowe,

10 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

containing news, tips, links of the month and much more. Subscribe today and don't miss a thing! Real-Time Article Update (click for sample) Monthly Article Update (click for sample) Monthly Newsletter (click for sample)

Latest articles by Janique Carbone


Windows Server 2012 Hyper-V Integration Services Installing and Configuring Windows Server 2012 Hyper-V (Part 1) Installing and Configuring Windows Server 2012 Hyper-V (Part 2) Whats New in Windows 8 for Hyper-V Based Cloud Computing (Part 11) - Hyper-V Disaster Recovery Scenarios What's New in Windows 8 for Hyper-V Based Cloud Computing (Part 1) - Hyper-V Key Features

Related links
Performing a P2V conversion to VMware ESX Server using VMware Converter Enterprise Understanding VMware ESX Server Security Profiles Hyper-V and HP Proliant Support Pack (PSP) Running Windows NT 4.0 under Hyper-V "Connection was lost" message in hyper-V console

Featured Links*
NEW white paper by Greg Shields! VMware and Microsoft VSS: What You Need to Know Learn to identify the roles of a VMware and Microsoft VSS provider, VSS requestor and VSS writer as important steps in selecting the right backup product. ManageEngine Applications Manager: Physical, Virtual & Cloud Application Management Monitor your servers, applications, databases, web transactions, etc, in your physical, virtual and cloud infrastructure. It includes performance troubleshooting, capacity planning and root cause analysis. Download 30-day Trial. Download 2X ApplicationServer XG Trial Version Deliver virtual desktops and applications from a central location, providing continuous availability, resource-based load balancing and complete network transparency. New webcast with Doug Hazelman! Unify Data Protection Across VMware and Hyper-V Learn more about VMware and Hyper-V backup challenges and opportunities. Don't miss this webcast hosted by Doug Hazelman, V.P. Product Strategy, Veeam Software. Hyper-V Backup Free, forever. No catch, no sales pitch. Altaro Hyper-V Backup takes the guesswork out of backing up Hyper-V VMs and does all the complex backup configuration for you. Easy to use. Fast. Reliable.

11 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Receive all the latest articles by email!


Receive Real-Time & Monthly VirtualizationAdmin.com article updates in your mailbox. Enter your email below! Click for Real-Time sample & Monthly sample

Community Area
Log in | Register

Become a VirtualizationAdmin.com member!


Discuss all your Virtualization issues with other experts. Click here to join! My Account | Log out

Featured freeware!

12 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

Get a free copy of the new SolarWinds VM Console! Articles & Tutorials Application Virtualization Articles Citrix Articles Citrix Presentation Server Cloud Computing General Virtualization Articles Microsoft Hyper-V Articles Product Reviews Terminal Services VDI Articles VMware ESX and vSphere Articles VMware Server, Workstation, & Player Articles Authors Wilco van Bragt Scott D. Lowe Freek Berson Brien M. Posey David Davis Janique Carbone Blogs Backup Section FAQ Free Tools Hardware Storage Servers Thin Clients Message Boards Newsletter Signup RSS Feed Services Consulting & Implementation Services Virtualization Hosting Tips & Tricks Software Application Servers Application Virtualization Backup & Recovery Free Tools High Availability Hypervisors Monitoring, Management, & Performance

13 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

P2V & V2V Conversion Security Storage Virtualization VDI White Papers

Featured Products

Readers' Choice
Which is your preferred Backup and Recovery solution? Acronis Backup & Recovery 11.5 Advanced Platform Altaro Hyper-V Backup AppAssure Backup, Replication & Recovery Software CA ARCserve Backup FalconStor Virtual Tape Library PHD Virtual Backup ShadowProtect Server Syncsort NSB Veeam Backup & Replication Virtual Solution Box Other

TechGenix Sites
ISAserver.org The No.1 Forefront TMG / UAG and ISA Server resource site. MSExchange.org The leading Microsoft Exchange Server 2010 / 2007 / 2003 resource site. WindowSecurity.com Network Security & Information Security resource for IT administrators. WindowsNetworking.com Windows Server 2008 / 2003 & Windows 7 networking resource site.

14 of 15

08/03/2013 17:30

How to Use Hyper-V Snapshot Revert, Apply, and Delete Options

http://www.virtualizationadmin.com/articles-tutorials/microsoft-hyper-v-a...

MSPAnswers.com Resource site for Managed Service Providers. WServerNews.com The largest Windows Server focused newsletter worldwide. Articles Authors Blogs FAQ Free Tools Hardware Message Boards Newsletter Services Software Tips White Papers About Us : Email us : Product Submission Form : Advertising Information VirtualizationAdmin.com is in no way affiliated with Microsoft Corp. *Links are sponsored by advertisers. Copyright 2013 TechGenix Ltd. All rights reserved. Please read our Privacy Policy and Terms & Conditions.

15 of 15

08/03/2013 17:30

Das könnte Ihnen auch gefallen