Installing two operating systems on one system is not new, it has been possible for years. So why this blog post? With the introduction of Windows 7 and Windows 2008 R2 it’s possible to boot from VHD. The VHD (Virtual Hard Disk) file format is know from virtualization products like Virtual PC, Virtual Server and Hyper-V. The file format a container with can contain a operating system but can also contains documents and applications. Within Windows 7 and Windows 2008 R2 a VHD container can be attached like a normal physical disk. In this post I will guide you through the steps to make Windows 2008 R2 boot from VHD. The OS will boot entirely from a VHD and is running on physical hardware instead of running virtual. This guide assumes you are already running Windows 7 which is installed on a physical HDD.

Step 1.

Insert and boot your system from the Windows 2008 R2 DVD.

 win2008r2_installation_01

Choose the right regional settings and press next.

Step 2.

On the installation screen don’t choose “Install Now” but press SHIFT+F10. A command console will open.

win2008r2_installation_02 

 Step 3.

Enter diskpart to start the partitioning utility.

Step 4.

Create a new VHD file by entering.

create vdisk file=”D:\pathToVhd.vhd” type=expandable maximum=maxsizeInMegabyte

Step 5.

Now select the new VHD and attach it as a physical disk.

select vdisk file=”D:\pathToVhd.vhd”
attach vdisk

Step 6.

Close the command console and continue the installation as normal. You will notice a extra destination volume you can choose from. Select the VHD volume and finish the installation.

Step 7.

After the installation you can choose which OS you want to boot from. Too change the default OS in the bootmanager use BCDEDIT.

Open a command console and start bcdedit /v

 bcdedit

There will be a list of all the different Windows Boot Loaders. Each of the Boot Loader has a unique ID. Only one of the Boot Loaders has been set as default, see first red box which indicates that Windows 7 is the default loader right now. To set Windows 2008 R2 as default loader type bcdedit /default {indentifier}

Leave a Reply