Tags


My challenge handed to me was to learn how to get the new Windows 7 to boot from a VHD.

My head spun about on all the hows and whys and wherefores.

There were theory’s on using Virtual PC’s to create the drive.

In some ways it was quite vague.

But after digging all over online, I found the best resource was from a site I like to follow called “The Lazy Admin”

This excellent article written by Rodney Buike broke it right down to the what did and didn’t work.  Which helped me understand the process where I was missing pieces.

Let’s break down what the VHD boot isn’t.

It is NOT a Virtual PC or a Virtual O/S.   Although a Hyper-V VHD might work in this scenario, it is the Virtual File system part of the VHD that is more important.  This is a hardware dependant install of Windows 7 or Server 2008R2 installed within a Virtual Hard Drive. 

Although in THEORY a Sysprep might strip out the hardware components to bring that VHD onto a new machine.  But that’s a different blog post for a different time.

What is the difference between this and a Virtual PC?

The Drivers.

This install uses the ACTUAL drivers from the board.  There is no abstraction between the hardware and operating system.   No Emulation.  No Hypervisor required.

this Means it will perform so close to being on the regular file system you won’t care.

This means when I installed Windows 7 into my VHD I actually had to get my Video driver from Nvidia, the Sound card driver from SoundMax working.

The advantage to using THIS as a Dual Boot scenario I could immediately see.

No repartitioning.  No stretching or resizing of drivers.   No wasted space because you allocated an extra 20 gig to play with just in case.

After all, being a VHD you can make it a 20 gig Dynamic VHD, and unless it uses that space it can be as small as you like.

So what is the process?

Pretty simple.

Whether you are using Server 2008R2 or Windows 7.

 

You boot up from the install Media. 

image

Select the Repair Your Computer option.  

Choose the Command Prompt from the Repair Console.

image

using the DISKPART.EXE in the console create a blank Virtual Hard Drive and Attach IT

in the following example, a twenty gigabyte Virtual Hard Drive called Win7.VHD has been created and stored in a folder called C:VIRTUAL in this example.

Picture1 After finishing this process the Command Prompt and Repair Console are closed down by closing “X” on each one.

Install Is chosen and the normal installation process continues.   you now simply choose the newly attached unprepared 20 gigabyte hard Drive and install as normal.

Once the install completes you will have a NEW CLEAN Windows7 (or Server 2008R2, depending on what media you used) inside the VHD file.  Windows 7 upon bootup will give you two choices, both will be named Windows 7 (as the O/S uses that as a default).   You will need to install the necessary drivers.

Next time we’ll explain how to use BCDEDIT to add/copy, set and delete boot entries to name the entries to something a little more correct or remove them when we’re done.

Cheers

Sean
The Energized Tech

Advertisements