Skip navigation

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

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\\]\<any directory structures used\<vhd filename>
bcdedit /set \\{previous entered GUID value\\} osdevice vhd=\\[LOCATE\\]\<any directory structures used\<vhd filename>
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:\Windows\system32>bcdedit /copy \\{current\\} /d "Windows 2008 R2"
The entry was successfully copied to \\{63b38b1e-4348-11df-ac53-001c23449a2b\\}.

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

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

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

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

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish