Volleynerd Knowledge Base

Thursday, October 01, 2009

Win7 Boot to VHD


Sort of followed this post from Hanselman. Tried to install Windows 7 straight to a VHD that was mounted and given a drive letter in Disk Management, but Win7 install would install there.

Now trying this:
  • Use Virtual PC 2007 to create a new VHD and start the Win 7 install on it
  • The Win7 install starts with copying files to the designated drive (the VHD in this case), and then restarts for the rest of the install. At this point when it's going to restart, CLOSE THE VIRTUAL MACHINE! (i.e. you do not want it to start back up and resume installation)
  • Now the VHD has the files needed for setup, and is ready to boot to. Now we just have to add the VHD to the boot loader list. Run the following bcdedit commands to add it to the list (taken from Hanselman's post):
bcdedit /copy {current} /d "Some Name for Your VHD" (this name will show up in the boot choices)

bcdedit /set {b614f341-ab38-11de-ae36-e3ac8de0d3bb} device vhd=[D:]\VirtualDrives\BaseWin7.vhd
bcdedit /set {b614f341-ab38-11de-ae36-e3ac8de0d3bb} osdevice vhd=[D:]\VirtualDrives\BaseWin7.vhd
bcdedit /set {b614f341-ab38-11de-ae36-e3ac8de0d3bb} detecthal on


Now restart the machine and you should see the new boot option in the list. When you choose it, the Win7 setup will continue from where it left off in the VPC!

Woot!



Comments: Post a Comment

Home