Boot from VHD

If you need to run multiple instances of Windows on your computer, you have different options. First you could use software like Microsoft Virtual PC or VMware Workstation to run a virtual instance. But if you need more performance, or you have to run for example Microsoft Hyper-V you need a native installed Operating System. Until Microsoft added the feature “boot from VHD”, you had to create different partitions for each installation. Since Microsoft allowed you to use VHD to boot you won a lot of flexibility.

This guide should show you how you can install a new operation system in a VHD, which you can boot from.

  1. First boot from a Windows Setup DVD or USB Stick
  2. On the screen where you could click “Install now” you have also a “Repair your computer” option in the bottom left corner. Click on this option or use the short cut “Shift + F10” to boot in to the command line mode.
  3. Enter diskpart
    Capture1
  4. Create a new VHD file
    create vdisk file=”filepathandfilename” type=”expandable” maximum=maxsiize
    Capture2
  5. Now you have to attach this VHD
    select vidsk file=”filepathandfilename”
    attach vdisk
    Capture3
  6. Now you can switch back to the “Install now” screenby pressing “ALT+TAB” and now do the setup on the new create vdisk.
  7. If you start Windows the next time you will see the new and the old Windows in the boot menu.

If you want to add a already existing VHD to the boot menu you can use bdcedit to edit the boot menu.

You can get more information here.