Dual Booting Windows 7 with Hyper-V

I’ve started in my new job and I’m in “personal” hardware heaven.  I’ve a snazzy HP Eltitebook 8740w with an i7 processor, on the way, and have a 256 GB SSD, 512 HB hybrid (SSD cache) drive (in a DVD slot caddy), and additional 8 GB RAM (to bring the laptop to half it’s 32 GB RAM potential), and a 12 cell battery.  It’s going to be a mutha for demos.

I also have a desktop machine.  That’ll allow me to double up my virtual load at peak usage, but it is intended mainly as the office machine while I work in the laptop lab.  The good news is that it’s an i5 CPU PC, with 12 GB RAM.

So that means I need to start Hyper-V building.  The plan is to dual boot with Windows 7 on both machines.  I could go with external disks but that means carrying stuff.  I’ll have enough internal storage so the plan is to boot from VHD.  This means the server OS will be installed in a VHD. 

Now I could go installing an OS in a VHD.  Yawn!  Time consuming.  Alternatively I could use WIM2VHD.  Note that you must install WAIK for Windows 7 to provide the prerequisite tools for this utility to work.  I’ve taken the install.wim file from the Windows Server 2008 R2 media, and run it:


That will create a VHD file with an “installed” operating system.  This works because the Windows installer consumes files from a WIM file in the ISO/DVD that is a file based image, making it easy to read, consume, and manipulate.  I could have customise the install using an unattend file:


Now I can configure my PC to boot from this VHD.  First step: attach the VHD.  You can do this from an elevated command prompt.

select vdisk file=c:W2008R2Ent.vhd
attach vdisk
list volume
select volume <volume_number_of_attached_VHD>
assign letter=v

This attaches the VHD file that you have created from the install.wim file using WIM2VHD.  It then assigns the drive letter V (or whatever is free for you) to that VHD.  You can see this in Disk Manager.

The following commands will now configure your PC to add an additional boot option to allow your machine to dual boot with Windows 7 on the C: drive (default) and Windows Server from the VHD (just added):

cd v:windowssystem32

bcdboot v:windows

Now your PC can dual boot.  All that remains is to configure the server with Hyper-V, etc.


When you reboot a boot menu appears.  By default, the new Windows VHD will be the default, but you can change it as above in Advanced System Settings.

The VHD will boot up, and commence the mini-setup wizard.  The OS is customised, boots up, and you can log into it, install drivers, enable Hyper-V, and so on.  I’ve got this working on my PC.  Next up will be the laptop.

I think this is a great way to get a Hyper-V host up and running.

Oh and it doesn’t end there …

You may have heard that SCVMM 2012 can deploy Hyper-V hosts.  It does this by deploying a VHD and configuring the host hardware to boot from that VHD.  Where does that VHD come from? Maybe (I haven’t tried it yet because I don’t have the required hardware) it could come from WIM2VHD and an install.wim? 

Comments on a post card …

Please follow and like us:

Leave a comment

Your email address will not be published.