Hyper-V Program Manager
People occasionally contact me and ask me how to fix a virtual hard disk that they have which is reporting corruption.
The short answer is: "Run data recovery tools inside the virtual machine."
For the long answer we need to look at how the virtual hard disk is structured. Reading from the Virtual Hard Disk specification (available here) you can see that virtual hard disks have the following structure:
Breaking down the components of the virtual hard disk - there is:
Now let us look at the implications of data corruption in each of these areas - and the possible actions you can take:
With all of this information I can provide the "medium length answer" as to what to do with corrupted virtual hard disks, as follows:
One final point I would like to make here is this - if you ever suffer data corruption in a virtual hard disk it is important that you figure out how it happened. The two most common causes I have encountered are:
In either case you want to identify as fix the root cause as soon as possible - otherwise you are going to suffer further corruption and data loss in the future. I strongly recommend starting by looking at the event log in the host / parent environments - as 90% of the time this will provide you with the information that you need.
Just wondered if running any of the tools available in Hyper-v on the VHD might help? eg. Compact, Convert etc.
Have some VHD files that run fine in Hyper-V but the actual files themselves won't copy due to CRC errors.
there's only 1 tool on the market that can recover corrupted VHD files (besides restoring from a backup): MediaHeal
google "mediaheal" - it's $150, but winimage, vmware tools, and everything else we've tried will not work if any portion of the header/footer is bad.
It would be nice if VMWare & MS would include recovery blocks in their virtual disks (like PAR) - or just include that option (at the expense of a little more space).
Restoring a 500+GB virtual hard disk from a backup takes hours.
I have an dynamic VHD - after an reboot I lost 3 days of work. It look like the Headers have an error and not point to the correct Data Block.
Is there a way to correct the header??
Thanks a lot
How do I run data recovery tools inside the virtual machine when I can't start up xp mode/
You can reapir Corrupted VHD files with the help of software called Kernel for VHD tool, Using this tool you can efficiently repair corrupted VHD files corrupted due to various reasons like viruses or interruption during backup process.
Thanks for posting this information. I encountered the same issue. gallery.technet.microsoft.com/VHD-Recovery-da852e8b link is the another big source of Hyper-V i found very helpful