Wednesday 17 February 2010

VHD Trickery

I'm not 100% certain on this, as it's something I've just stumbled upon, but if I'm correct, Microsoft are actually standardising on their VHD (Virtual Hard Disc) file format by putting it to good use. Allow me to explain how I got here:

Those of you who read my Twitter posts (@imorital) will know that I recently managed to kill my work Windows XP installation after installing a new graphics card into the machine (to run the PC dual head) and attempting to apply the ATI Catalyst Video Card Drivers (and I'm talking about the latest versions at the time, not even the decrepit old drivers on the install disc, although they would probably have done less harm).

To cut a long story short, the Catalyst install failed, and soon after, and this may be coincidence, my machine started behaving very badly, from a boot-up to usable time north of 8 minutes, to severe screen drawing issues and poor instability and performance.

I tried various things to fix the computer, but it was going from bad to worse, so after a few days I was given the go-ahead to perform a fresh OS install, and since XP is nearing end of life the OS of choice was Windows 7. This would also allow some testing of our applications under this new environment (remember, the company had skipped Vista, so any changes such as UAC and registry permissions were also being encountered for the first time).

As part of the re-install, the graphics card that spurred all the troubles was removed from my machine, so I'm now running a single monitor again.

That brings us up to where we are today.

I was (am) toying with the idea of using that old graphics card, mainly as I suspect the Windows 7 drivers will be much more reliable than those for XP. It's an ATI Radeon HD4350 card, so there's one or two of them in the wild. Having said that, there's absolutely no way I'm not covering myself this time, and fortunately Windows 7 Professional can help do this by allowing me to do a system image first.

This feature lives in the same general area as the backup functionality and looks quite interesting. From what I can tell it basically does a ghost of the system drive, which you can later either restore from Windows control panel, Windows start-up (alongside the Safe Mode options) or via the Windows7 install discs by choosing repair.

If it works then it should only take a very short time to restore... but here's the interesting part: The image file is written as a VHD, so it can be mounted into Virtual PC and essentially you have a clone of your main PC running in a virtual server, much like VMWare converter would do.

Additionally, I know it is possible to multi-boot using a VHD; so I assume, and this is an area I haven't investigated yet, that I could potentially multi boot into a second copy of the OS which would be identical to the first. I could then add the drivers to the second Windows 7 installation and run with this for a while.

If everything is OK I can then restore this second OS over the top of the main OS (making the machine single boot again and reclaiming the lost disc space), or if it all screws up just boot into the original instance and delete the VHD and all traces of it and the corrupt drivers.

That's the plan, only time will tell how much of this is possible (I suspect re-installing from the modified VHD will be tricky)

The next question is "Will I ever have time or the courage to do it and risk taking out my work PC again", even if it will only be for a few hours next time.

More info on this can be found at: http://www.sevenforums.com/tutorials/675-system-image-recovery.html

*Of course, if I just keep the image in a safe place and do my experiments in the primary OS, then I can still restore if it all goes wrong. That is probably the approach I will take as it’s simpler, but I’ll investigate the whole boot from VHD and run as a Virtual Machine thing at some point, if nothing else it can be used to test the created image is not corrupt!

No comments:

Post a Comment