Boot from VHD in Windows 7

I’ve downloaded a VHD file from Microsoft and wanted to boot from it. Just to experiment with the new feature. Here are the surprisingly simple steps to take:

1. Create an extra boot entry (copy from current entry) and give a description, BCDEdit will echo the created identifier:

bcdedit /copy {current} /d "Windows 7 Foundation Suite 3 VHD" 

 

"The entry was successfully copied to {a20180a3-a426-11de-96df-a3075ebd94a1}.

bcdedit-copy

2. Set VHD to the newly created bootloader entry, with this two commands:

   1: bcdedit /set {a20180a3-a426-11de-96df-a3075ebd94a1} device vhd=[D:]\Images\WDTFS-x64.VHD\WDTFS-x64.VHD 

   2: bcdedit /set {a20180a3-a426-11de-96df-a3075ebd94a1} osdevice vhd=[D:]\Images\WDTFS-x64.VHD\WDTFS-x64.VHD 

 

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

3. Force auto detect the Hardware Abstraction Layer (if you’re using a syspreped VHD)

bcdedit /set {a20180a3-a426-11de-96df-a3075ebd94a1} detecthal on

Replace identifier (don’t forget curly braces) and .VHD path (yes, with square brackets) with your own.

4. We’re done! Reboot your machine and you will be presented with a new boot menu.