References, Server 2008 R2, Windows
Leave a comment

Native VHD booting on a physical server

If you have been testing Windows 7 or Windows Server 2008 R2, you must have come across native VHD booting feature. This allows us to boot OS from VHD file residing on the hard drive. You don’t need a Hypervisor to boot from VHD. Windows 7 boot architecure changed a bit to accomodate this. In fact, Windows Server 2008 has the option to boot from a file. But that was with only WIM images.

In a previous post, I had written about how you can capture a VHD from OS media. There is also a simple script to generate the VHDs without any manual effort. Now, in this post, let us look at how we can use one such VHDs to multi-boot with existing OS on a physical server. The procedure is straight forward. You just need to add a BCD entry. To do this,

1. At a command-prompt, Run diskpart

2. Within Diskpart, select vdisk file=C:\<VHDNAME>.VHD

3. Attach Vdisk

4. Assign Letter=R (If not already assigned; diskpart usually picks up whatever you had assigned during creation)

5. exit

6. At the command prompt, move to R:\Windows\System32 and run bcdboot.exe R:\Windows. This will add an entry to the BCD of exiting OS

7. Once again, open diskpart

8. Within diskpart, Select vdisk file=C:\<VHDNAME>.vhd

9. Detach vdisk

10. exit and reboot the system

At this point, when Boot Manager comes up, you should see an entry added at the top of the list. Select the top most entry and press enter. Windows OS will start configuring based on your hardware and after a reboot, you should be at the logon prompt.

Filed under: References, Server 2008 R2, Windows


Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.