Solved

Hyper-V Snapshots

Posted on 2011-09-22
4
1,115 Views
Last Modified: 2012-05-12
I am trying to rollback my VS using a snapshot but getting an error (cannot load the snaphsot file).

I had recently deleted some snapshots (via interface) to make more hdd space (foolishly i deleted them with the VM turned on so only the link was removed, not the AVHD files). After doing some research it appears i have broken the differencing chain as the server appears to have reverted to the original VHD file which was setup months ago, hence i have lost months worth of work.

I have all the AVHD files there but cannot work out how to apply any of these snapshots. Does anyone know how i can rectify this problem?

Thanks
0
Comment
Question by:Antikythera
4 Comments
 
LVL 17

Expert Comment

by:James Haywood
ID: 36582860
You can try doing an 'offline merge' by using the disk editor.
0
 
LVL 3

Accepted Solution

by:
OliverLo earned 250 total points
ID: 36583349
Hello,

Please take a copy all VHD and AVHD and you could then try to merge the older AVHD with the one before until you can merge the resulting VHD with the parent VHD.
For instance if you have the following snapshot tree:
PARENT
     ---------SNAP1
                      ----------SNAP2
                                     ----------SNAP3

Let's say you want to restore the VM at stage SNAP2.
You could try to merge the disk SNAP2.avhd with the disk SNAP1.avhd.
Then you could merge the resulting disk SNAP1-2.avhd with the parent disk.
In this way you would save all changes that occurred between the creation of the VM and the time SNAP2 was taken… If you don’t merge SNAP3 then the change it contains will be lost which is what you wanted.

This article may help you:
http://zahirshahblog.com/2010/10/24/how-to-manually-merge-hyper-v-snapshots-into-a-single-vhd/

Let me know if it worked as expected.
0
 
LVL 8

Assisted Solution

by:TSGITDept
TSGITDept earned 250 total points
ID: 36917079
If you're unsure which differencing disk (AVHD) is related to each of the other disks in the chain you can inspect it in Hyper-V to determine the order.  Once you have the chain order you can set that as your hard disk(s).  Offline Merges have been somewhat problematic when the chain is corrupted, e.g. deleting one of the AVHD files in the chain.

1 - 'Inspect' the disks in Hyper-V to determine the parent / child relationships
2 - You can also figure out the parent / child relationships with the file date, unless you have your than one Snapshot tree.  (Inspect Disk> Select a disk > view where it fits into the chain > make a note of the relationships
3 - If your backup software is Hyper-V aware (often this requires purchasing a backup agent for Hyper-V) restore the backup.  You can also restore to a different VM.  I'd try this if you have disk space so as not to blow away your original, even if it is out of date.
4 - There are third utilities out there that allow you to edit these files.

You can create a new VM for all of the experimentation but it appears that you're already low on disk space.
0
 

Author Closing Comment

by:Antikythera
ID: 36924833
Thanks for the comments - TSG, you are right about the merge. It is a long winded process and didnt resolve any issues.

After 4 days working solid, i solved it. When creating a new VM using an existing VHD file, it still creates a new set of config files.  

I basically copied and pasted the old BIN and VSV file into the newly created config director and renamed the files to the new config names. I then had to edit the XML and put the pathname as the latest .avhd file i had restored. Started it up and worked a treat :)
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question