Note: I have no idea what the next version of Windows Server will be called – I am just using “Server 8” as a short version of the Developer Preview of Windows Server from the Build conference – downloadable from MSDN
It’s simple enough – people have been asking how to do this for a bit without having to use all sorts of extra tools like WAIK, WIM2VHD or even screwing around with BCEDIT.
Why would you WANT to boot from VHD anyways? It’s a file format supported and included as a mountable file instance since Windows 7. I use it instead of partitioning my drives when I want to screw around with an OS directly on my hardware without having to reformat all the time. Great for evals, lab setups or custom configs of the OS when you want no barrier to performance on the hardware that comes with virtualization.
What is my configuration? I want Win7 as the main OS on my laptop. But I also need to boot it into “Server 8” to play around as well as demo things in Windows Server 2008 R2 SP1. Result – My C drive is formatted with Win7. I have carved up my D drive (second physical drive in this laptop) into 2 dynamically expanding VHDs: d:vhdServer8.vhd AND d:vhdW2K8R2sp1.vhd.
How? Simple. After the Windows 7 install, I create the sub directory where I want my VHDs to be created. You will want to make note of the full path including drive letter AND label. Next I rebooted using my trusty multiboot USB stick and at the first prompt to choose the region – I press SHIFT F10. At the command prompt type in the following:
- DISKPART
- LIST VOLUME
- this displays all the volumes that the OS sees. Remember I asked you to make note of the drive label – booting from USB / DVD will screw with your assigned drive letters and you’ll need the info to ensure you are placing the new VHD in the right spot. In my case it was still D:vhd
- CREATE VDISK file=d:vhdserver8.vhd type=expandable maximum=100000
- this creates a dynamically expanding 100gb vhd called server8.vhd.
- SELECT VDISK file=d:vhdserver8.vhd
- ATTACH VDISK
- this now mounts the disk and makes it visible as a drive for the install process.
Use a custom install to be able to select the drive and create a partition in the drive for installation of your new OS of choice.
Proceed as normal and complete the install.
Simple, eh?