Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

IMPORTANT

I not a big fan of Hyper-V snapshots. They are mostly too complex, they create .avhd files that are way to big etc... Now, I have a scheduled task running that keeps snapshots for a week (7d) long. When I look into my Hyper-V manager I see 7 snapshot files. But on the other hand when I looked into the \Hyper-V\VHD folder I found lots more .avhd files so I decided to delete every snapshot older then 2 weeks. Couldn't do no harm I thought. First cause was that the Hyper-V V.M. didn't wanted to start anymore. I got an error like:

"the chain of virtual hard disks is broken"

I still had my weeks history of each V.M. so I decided to delete (merge) the entire 'tree substructure' per V.M., in Hyper-V Manager GUI. This gave no errors and all snapshots were removed one by one.

But, I still couldn't start the V.M., same error. Eventually there was no other option left than delete the V.M. entry and recreate it, where I choose the .VHD file as 'existing virtual hard disk'. This -of course- got the V.M. up and running again.

Unfortunatly I have the impression (I'm sure) I've lost a lot of data that were in the snapshots.

What do I have:

  1. -the snapshots from now till 2 weeks ago

  2. -the snapshots for 3 weeks ago till 6 weeks ago (backup-recovered)

What I don't have/lost:

  1. -the snapshots from 2 weeks till 3 weeks ago

  2. -most of the .XML snapshot files (which were deleted automatically apparently)

One of these V.M.'s + snapshots contained very important data, which now seems to be lost

Help would be very much appreciated! Thanks in advance!

share|improve this question

2 Answers 2

A differencing disk chain only stores the unique blocks in each link in the chain. An avhd file contains the blocks that differ from the parent (and grandparent.) By deleting links in that chain, you have deleted unique data that existed nowhere else. There is no recovery from your situation.

I doubt that Hyper-V snapshots are what you want. It sounds like a VSS snapshot from within the VM would have served you better.

share|improve this answer

It sounds like you're trying to use the Hyper-V snapshots as a backup/restore plan. I'd suggest that you rethink this strategy. Snapshots aren't good for keeping a 7 day (or longer) history on your VMs. You should use snapshots for very specific restore issues - like if you install an upgrade to an app, and want the ability to quickly revert. For other daily use though, you should be using regular backup software (windows backup, or the software of your choice) to backup the OS inside the guest VMs or to backup the VMs from the host system.

Along with the above - deleting files from your VM directory is just asking for trouble. Use the Hyper-V manager to manage your VMs - when its done with the snapshot files, it'll get rid of them. If it hasn't gotten rid of them, then it's likely that it still needs them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.