I have been taking advantage of the Boot to VHD capability that is available with Windows 7 and Windows Server 2008 R2 to boot to multiple installations of Windows 7 or Windows Server 2008 R2 without having to repartition my hard drive. This capability is awesome and super useful. With the release of Windows 8 Consumer Preview and Windows Server 2012 Beta (formerly Windows Server “8” Beta), there are lot of folks who want to test these beta releases of our Operating Systems out without having to rebuild their machines. Boot to VHD is a great solution for this as well.
For those of you who have done an installation of these two new operating systems, you know that the boot loader has changed ever so slightly. If I follow the exact same steps I normally did to create my Windows 7 or Windows Server 2008 R2 VHD to create my VHD for Windows 8 Consumer Preview or Windows Server 2012 Beta, I found that the boot will fail. I found this to be true whether I created the VHD by using Hyper-V to create the VM and then copy off the VHD or by creating a VHD from Disk Management and then using XImage to install Windows 8 CP or Server 2012 Beta.
My boot options before I do any steps look like this:
The next step is to attach the VHD file that I want to use by going to Computer Management | Storage | Right Click on Disk Management and select Attach VHD. Browse to the VHD you created and click OK. Once the VHD is attached, the drive(s) will show up in the management view. In my case, when I attached the VHD, drives E: and F: were assigned to the two partitions in my VHD file. Drive F: is where Windows Server 2012 Beta is installed and the drive I will use in the next step.
Next, I open a Command Prompt as Administrator and execute the following command:
This will automatically add an entry into the Boot Loader for my Windows Server 2012 Beta VHD.
That is straight forward and simple. If I were already running Windows 8 Consumer Preview or Windows Server 2012 Beta as my primary OS, then I could have simply run my normal BCDEDIT commands to create the entry or use a free tool like VisualBCD or EasyBCD to create the entry and things would just work.
I hope this helps you as well.
<p>Thanks a lot for this tip; it will be a lifesaver for me.</p>
<p>Rod, I'm glad this was helpful.</p>
<p>A quick question: can I restrict the drives on the physical system from appearing in the VM?/</p>
<p>amazing its working..thnx a million</p>