No matter how many times I’ve restored a client server, it’s always a tense time until it comes back and I’ve verified all is right. Fortunately, this hasn’t happened very often.
Last week had a client whose Hyper-V virtual server would not boot. It gave an error of “corrupt directory or file,” which didn’t sound promising. In addition, the backups had quit working a week ago. Restored the virtual machine from a week ago and that worked well, but there was a week’s worth of sales, inventory, etc. that did not have a paper trail to go back to.
Needless to say, the pressure was on to retrieve the data. After some “Googling,” found some references that said compacting the disk in Virtual PC, opening it there, and then moving back to the Hyper-V would work.
Server was a Windows 2008 R2 DC which is a 64-bit operating system.
So here’s what I did:
1. Installed 64-bit Virtual PC on my 64-bit Windows 7 laptop.
2. Copied VHD file over to laptop.
3. Compacted VHD disk in Virtual PC. This took about half hour and was a 23 GB VHD file.
4. Tried opening in Virtual PC, but it wouldn’t open.
5. Copied VHD back to the Hyper-V server.
6. Created a new Virtual Machine in Hyper-V manager and attached to the copied disk.
7. Was able to boot up the server, had to reset the IP numbers and reactivate the Windows license, but all data was there.
In anticipation of a failure of the above process, I also converted the VHD to a WMDK file using WinImage and was able to open this up in VMware Workstation 7. I would’ve been able to export the database and reports out and put in the restored VM from a week ago if the compacted disk did not work.
Getting this all working, really made my day, but it also reinforces my belief that server monitoring and checking backups is never something that should be ignored.