Hyper-V corrupt .avhd file after host server crash

I am at wits end with this one.  I had a Windows 2008R2 HyperV host that I inherited as a problem.  It is hosting an Exchange Server 2010 VM which is set up with two virtual hard drives.  One hard drive is the System drive where the OS resides and the second is the Data drive where the data files including Exchange 2010 reside.  The server has a parent image and then three other snapshots that were apparently used as backups of some sort.  The latest snapshot is mounted as shown in the picture on IDE Controller 1 and is linked to a .avhd snapshot for some reason.  Well, the host server lost power and when the VM starts, it reports that the file is unreadable and corrupt.  I restored the entire directory the Hyper-V guest OS is stored in and get the same thing, unreadable and corrupt.  Since it is a snapshot and not a parent image, I think hope is lost so I am looking for alternatives.  I was able to open the latest .avhd file with a program called Kernel for VHD and I could see all of the files.  The odd thing was the modified dates were years old on the Exchange files but I am not sure this program can see the dates correctly.  There is not an option to repair the avhd file with this program that I can see, so it looks like my only option would be to buy it and extract the files from the VHD and then put them back on the server into a new virtual hard disk.  Is there any other way I could make the existing .avhd file readable?  I have also tried following an article that talked about creating a new machine and then attaching the corrupt .avhd file and compacting it, but this failed and I think it was due to it being a .avhd snapshot and not a .vhd parent file.
Steve BantzIT ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Take a look at the following link:


In this case the author created his own problem, but the solution may still work for you.  It appears he created a brand new VM and attached the latest snapshot to the new VM and was able to get things up and running.

In your case you may want to look to create a new VM and create a new OS disk and do a fresh install of the OS on the OS disk.  Once that is created, restore the latest backup of the VHD and AVHD files to the VM location and point the new VM's second controller to the latest AVHD.

Fortunately Exchange 2010 has a Disaster recovery mode that will pull all the info needed to install and re-integrate Exchange as long as you have the .MDB files.  If you can pull just those files you should be able to do a full restore of Exchange.

It has been a while but I've done 3 or 4 times in the past few years.
Steve BantzIT ManagerAuthor Commented:
I can't get anything to work.  I have followed the Watkins article and most everything I have Googled to try and get this to work.  I am somewhat doubtful that the file is really corrupt because I have restored a few days of backups with the same result each time.  I read somewhere about corrupting the configuration portion of the .xml file but it appears to be fine.  I need to get this server back so I am down to two things I can think of.  1. Open a case with Microsoft or 2. Buy Kernel for VHD for $149.  With this possibility, I am envisioning keeping the existing Exchange VM, deleting the faulty virtual disk which holds the D partition on the server (the other virtual disk is fine and holds the OS on c:) create a new data partition virtual disk, format it with Windows and then copy the files extracted from the avhd file to the new D partition on the virtual machine.  In theory, this should work but I am not sure if there are any gotchas.  I am very lucky this client is tolerant of not having their Exchange server for a day or two.  

I just don't understand how intolerant of failure HyperV on Windows 2008R2 really is.  I know anything can happen and people will be quick to say you should have done this and should have done that to prevent this.  Probably, but it isn't my server and I'm inheriting a problem I didn't cause.

Anyone have any thoughts on which of my proposed options will bear fruit?
Did you actually try to create a brand new VM and connect the drive to the latest snapshot (all the other files including the root vhd need to be in the same folder as the snapshot you are connecting to).  If so and this fails, this eliminates the corrupted xml configuration.

I would say at this point open a case with Microsoft as you will have the best chance of recovering the full server.  If you have and MSDN subscription or are a Microsoft Partner you may have free support for business critical issues such as this.

That being said the case with Microsoft will cost a lot more AND will probably take as long as your second option.  Most critical would be to get the Exchange DB.  So maybe the best answer is both.  If you buy the software, get the Exchange DB files and logs and open the case with MS, you can work on recovering the DB files to a new server while waiting for MS to call back.  If you fix before they call back you can let them know you fixed on your own and request them to reverse the charge.

In your position that is what I would do.  Make sure the client knows the cost for the call, but my guess is with Email being down that they will be fine with the charges.

I have been able in the past just to restore the .VHD, .AVHD files to a new folder and then create new VM and connect the drives to the new VM and have it work.  Is there a chance the backups themselves are corrupt?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.