Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a corrupt VHD that I need to get data off of. It is a Windows 2003 x32 Hyper-V Virtual Machine (NTFS). I have a nearly identical version of that VM without the data on it that works.

Using a hex editor, I tried inserting the old vhd into the working one after a few pages (randomly trying to compare), but I can't seem to get it to work.

It would be ideal to know the VHD file structure, so that I could know where the FAT is, where the VM header is, etc, so I can insert the bytes intelligently.

Anyone have any experience with this?

share|improve this question
I am curious if you ever had any luck in this space? – Alex S Sep 25 '15 at 6:43
up vote 1 down vote accepted

I'm not sure about repairing the actual disk or the details of the VHD container format but if you haven't tried mounting outside of the Virtual Server environment proper, that may be worth a try.

Apparently, WinImage can mount VHD containers:

share|improve this answer
Yeah, I've tried dice. If I'm going to get this back I need to actually modify the bytes...unless there is some VHD repair program out there (I haven't found any). – Adam Brand Jul 1 '09 at 1:41
Sorry I can't be of more've probably seen this but here's a MS technet page with links to the general spec document on the VHD format just in case you haven't: Not sure if that's got enough detail to help. Good luck and please share what you learn. – damorg Jul 1 '09 at 2:12
Perfect! That page links to this document:… which describes the spec in detail (including bytes). – Adam Brand Jul 1 '09 at 16:03

You could try opening it with VirtualBox. Or get a VMware product and use VMware vCenter Converter to convert it. There's a chance one of these products might compensate for the errors.

Another option is to use partition/hard drive recovery software. Even though the hard drive is virtual, it should respond the same way to recovery software.

share|improve this answer
VMWare Converter has salvaged a couple of corrupted VHDs around the office over the last year. – Kara Marfia Jul 1 '09 at 14:19

@Adam Brand: Were you able to fix the format of your drive? I have a vhd that got corrupted by VirtualBox and need to get it fixed. The drive only has data on it so don't need to boot up any OS. I've got a Hex editor and have been toying around with it but no luck so far. I got an event log saying the disk Footer Signature is invalid but it looks fine in Hex compared to a previous copy of the same disk. Any thoughts or direction would be awesome!

share|improve this answer
I haven't got around to is on my to-do list for some weekend. I would also read up on the filesystem of the drive itself (NTFS etc) to get an understanding of the underlying file structure. – Adam Brand Aug 26 '09 at 23:11

protected by Community Jun 16 at 18:40

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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