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?

  • 1
    I am curious if you ever had any luck in this space? – Alex S Sep 25 '15 at 6:43

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: http://www.winimage.com/winimage.htm

  • Yeah, I've tried that...no 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
  • 1
    Sorry I can't be of more help...you'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: technet.microsoft.com/en-us/virtualserver/bb676673.aspx 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: download.microsoft.com/download/f/f/e/… 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.

  • 2
    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!

  • I haven't got around to it...it 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 '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.