This is the easiest way to setup Boot from VHD on your computer. It will give you a multi-OS loader boot menu when you start your machine where you select what operating system you want to boot. The systems that boot from VHD files can be backed up and restore by copying that VHD file. Further it is a great way to test Windows Server “8”.
Steps to setup Boot from VHD (the easy way)
On a computer which already has an operating system installed, boot from Windows install media (Windows Server 2008 or later) and launch the installer. Before clicking “Install Now”, hit Shift+F10 and the command prompt will appear.
- diskpart – Start the diskpart program.
- list disk – This lists your currently attached hard disks.
- select disk 0 – Select the disk where you want to store your vhd file
- list vol … This lists all the volumes that exist on the selected disk. Find the volume you want to store your vhd file on. My usual c: drive is currently drive d: so I will use that.
- create vdisk file=d:\server8.vhd maximum=50000 type=expandable … This creates a Dynamic VHD that can grow to about 50GB in the root of my selected drive.
- select vdisk file=d:\server8.vhd – this selects my vhd file for the following command.
- attach vdisk … The vhd will be mounted as a disk. You can view with “list disk”
- exit – exit diskpart
- exit – exit the command prompt
Now we are back at the Install Windows wizard – click Install Now. When asked where you want to install Windows, you should see a new Disk 1 listed with Unallocated Space. The installer will tell you that “Windows cannot be installed to this disk” but the Next button is enabled. If you click Next, it will install Windows just fine. The Windows Setup program configures the boot menu for you.
Once the installation is complete and your computer reboots, you will see a boot menu that asks you to “Choose an operating system”. Just select the OS you wish to start.