Q. How can I manually add a virtual hard disk (VHD) to my Boot Configuration Database?

John Savill

April 18, 2010

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. If you have a VHD file that contains an OS you want to boot your computer from, run the commands below to add the VHD to the boot menu. Note that you need to be running the Windows 7 or Windows Server 2008 R2 boot loader.

bcdedit /copy \{current\} /d “Desired Name in Boot Screen for the VHD”
 bcdedit /set \{enter GUID output from previous line\} device vhd=\[LOCATE\]
 bcdedit /set \{previous entered GUID value\} osdevice vhd=\[LOCATE\]
 bcdedit /set \{previous entered GUID value\} detecthal on

If the VHD is running Hyper-V, you also need to turn on the hypervisor, with the command

bcdedit /set \{previous entered GUID value\} hypervisorlaunchtype auto

A full walkthrough is shown below, assuming the VHD is on the D: drive. Note that you have to type the square brackets.

C:Windowssystem32>bcdedit /copy \{current\} /d "Windows 2008 R2"
 The entry was successfully copied to \{63b38b1e-4348-11df-ac53-001c23449a2b\}.

 C:Windowssystem32>bcdedit /set \{63b38b1e-4348-11df-ac53-001c23449a2b\} device vhd=\[d:\]win2k8r2.vhd
 The operation completed successfully.

 C:Windowssystem32>bcdedit /set \{63b38b1e-4348-11df-ac53-001c23449a2b\} osdevice vhd=\[d:\]win2k8r2.vhd
 The operation completed successfully.

 C:Windowssystem32>bcdedit /set \{63b38b1e-4348-11df-ac53-001c23449a2b\} detecthal on
 The operation completed successfully.

 C:Windowssystem32>bcdedit /set \{63b38b1e-4348-11df-ac53-001c23449a2b\} hypervisorlaunchtype auto
 The operation completed successfully.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like