4

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?

Adam Brand
  • 6,127
  • 2
  • 30
  • 40

3 Answers3

1

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

damorg
  • 1,226
  • 7
  • 10
  • 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 01 '09 at 01: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: http://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 01 '09 at 02:12
  • Perfect! That page links to this document: http://download.microsoft.com/download/f/f/e/ffef50a5-07dd-4cf8-aaa3-442c0673a029/Virtual%20Hard%20Disk%20Format%20Spec_10_18_06.doc which describes the spec in detail (including bytes). – Adam Brand Jul 01 '09 at 16:03
1

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.

Joseph
  • 3,797
  • 27
  • 33
1

@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