Solved

Hyper-V Snapshots

Posted on 2011-09-22
4
1,106 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
Comment Utility
You can try doing an 'offline merge' by using the disk editor.
0
 
LVL 3

Accepted Solution

by:
OliverLo earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now