January 2010

You are browsing the site archives for January 2010.

To install Windows 7 on a virtual disk, follow these instructions.

  • Boot from the Windows 7 installation disc
  • Press SHIFT+F10 to open the command prompt
  • Start diskpart.exe
  • If you already haven’t already created a vdisk that you would like to install Win7 on, create one (see previous post)
  • Attach the virtual disk

    > select vdisk file="C:\path\to\vhd"
    > attach vdisk
    > exit

  • Continue with the installation by selecting “Custom Install”
  • Select the virtual disk (if you have formatted and named your disk, you will see that name now, otherwise you will have to consider the disk size)
  • Install Windows 7

The installer will create a boot menu entry for your new Windows installation and your existing non-virtual installation. Unfortunately, they are (by default) both called “Windows 7”. Very helpful… The virtual installation will be the first entry in your boot menu and started by default. Once your installation is complete, you can fix this issue with the “bcdedit.exe” command line tool.

Open a command prompt as administrator and follow these steps:

> bcdedit.exe

This will give you a list of all boot manager entries. Find the one that refers to your VHD file and copy it’s ID – {current} if you are currently running your virtual installation and usually {default} if you’re running the physical installation.

> bcdedit.exe /set description "New boot menu entry"

You can also create copies of your bood menu entries and adjust them to, let’s say, point to a different VHD file.

There is this fancy new feature in Windows 7 called “Boot from VHD”. It essentially allows you to boot your machine from a virtual disk without having to virtualize the rest of your hardware. This can be quite helpful if you want to experiment with your Win7 without reinstalling all the time because you screwed up.

First I’ll explain how you can create and manage virtual disks. In the second part I will discuss how to install a second Win7 on the created virtual disk and how to set up the bootloader correctly.
Continue reading Win7 Boot from VHD – Part I