boot from vhd on windows xp – the tuturial part 1

ok as promised – here’s my step by step guide with screen shots.  thanks to garry martin for a great post on mark wilson’s blog detailing this.  these posts will be a little bit backwards because this first one assumes you have already created or obtained a vhd of windows 7 enterprise or ultimate you wish to use (i will post this how to shortly).  i’m going to use windows virtual pc to grab the screen shots.


figure 1:  windows xp system with one partition (c:), a folder called vhd with a vhd called win7 in it and a windows 7 dvd


figure 2:  start up the workstation or laptop from the windows 7 dvd…


figure 3: from the windows 7 install windows screen, press shift + f10 to get to a command prompt


figure 4:  from the command prompt, confirm that the c: drive is the windows xp system and boot drive (dir c:), and then type the following command:  bootsect /nt60 c: /mbr and press enter

then type in the following commands (press enter at the end of each line):


select vdisk file=c:\vhd\win7.vhd

attach vdisk




figure 5: confirm the drive letter assigned to the vhd (in my case c: is the windows xp installation, d: is the dvd drive and e: is the vhd)

bcdboot e:\windows /s c:


figure 6: setup the default boot as windows 7:

bcdedit /set {default} device vhd=[locate]\vhd\win7.vhd

bcdedit /set {default} osdevice vhd=[locate]\vhd\win7.vhd

bcdedit /set {default} detecthal on

and then setup the alternate as windows xp with the following statements:

bcdedit /create {ntldr} /d “windows xp”

bcdedit /set {ntldr} device partition=c:

bcdedit /set {ntldr} path \ntldr

bcdedit /displayorder {ntldr} -addlast


figure 7: now you have a choice to start windows 7 or windows xp – enjoy and have a happy thanksgiving!

next tutorial:  creating the windows 7 vhd from the dvd!