Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

3 Answers 3

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

share|improve this answer
    
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.

share|improve this answer
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!

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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