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.
- First boot from a Windows Setup DVD or USB Stick
- 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.
- Enter diskpart
- Create a new VHD file
create vdisk file=”filepathandfilename” type=”expandable” maximum=maxsiize
- Now you have to attach this VHD
select vidsk file=”filepathandfilename”
attach vdisk
- Now you can switch back to the “Install now” screenby pressing “ALT+TAB” and now do the setup on the new create vdisk.
- 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.
bcdedit /copy {originalguid} /d "New Windows 7 Installation" bcdedit /set {newguid} device vhd=[D:]\Image.vhd bcdedit /set {newguid} osdevice vhd=[D:]\Image.vhd bcdedit /set {newguid} detecthal on
You can get more information here.
Tags: bdcedit, Boot, diskpart, Hyper-V, Microsoft, vdisk, VHD, Virtual, Virtual PC, VMware, VMware Workstation, Windows, Windows 7 Last modified: June 22, 2011