Share via


NicolTIP#011: Boot Windows Server 2008 R2 from VHD within Windows 7

Bare in mind that I already have Windows 7 installed.

  • Physical disk that will hold VHD file must be formatted (does not have to be empty, can not be USB)

  • Boot from Windows Server 2008 R2 DVD

  • When first installation dialog box appears pres SHIFT + F10 to open command prompt

  • Launch diskpart

  • At diskpart prompt enter following command create vdisk file=c:\win2k8r2.vhd type=fixed maximum=20000 (this will create VHD file of 20 GB and it will be fixed size, you can even use expandable as type. You can also change name and location of vdisk file)

  • Next, run select vdisk file=c:\ win2k8r2 .vhd

  • Run attach vdisk

  • Exit from diskpart and command prompt

  • When selecting partition on which to install Windows Server 2008 R2, select newly created and attached VHD partition. Ignore any warnings like "… cannot boot from this partition".

When installation finishes, you will have an option to boot from Windows 7 or Windows 2008 R2. If you want to remove Windows 2008 R2, all you need to do is edit boot menu with bcdedit command and delete or move VHD file.