When you install Windows 7 on your machine but not directly to your hard disk but to a VHD file in your physical disks

I have created article named Boot your physical machine from a VHD file describing the installation process.

In some cases you may want to take this VHD and to make it running inside Virtual Machine in Microsoft Hyper-V or Microsoft Virtual Server.

There is some simple facts you have to know about boot from VHD

    1. The windows is fully installed in the first partition on the VHD.
    2. When your machine restarts the boot files are launched from the physical disk.
    3. Next, the VHD is mounted and an entry in the Boot Configuration Data configuration loads the winload.exe

VM where the VHD is mounted will not boot and it will display the screen below; this means the partitions is not marked as active


to make the VM bootable it will take two main steps:

First, step is to make the Partition bootable

Second, we have to install the BCD in the active partition

To complete these steps.

I will boot the VM with Windows 7 DVD.






Click next to proceed in the repairing process.


Click Repair your computer.


Press next after finish searching


Select Command Prompt




Type in command prompt the following


then select the disk and the windows partition and mark the partition as active

Select disk 0

select partition 1





To restore the boot configuration data type the below commands.

Bootrec.exe /FixMbr

Bootrec.exe /FixBoot

Bootrec.exe /RebuildBcd

the final part is copy the boot manager files to the VHD boot partition.

Change directory to Drive D: where the Windows 7 DVD is mounted by type



copy bootmgr c:

copy bootmgr.efi c:

Now, you can start the VM and it will Windows 7 will boot correctly correctly.

Mahmoud Ibrahim (admin)

About the Author

Mahmoud Ibrahim has technology experience with over 18 years of IT industry. He'd worked in many organizations in many roles and expanded his knowledge across technology stacks, and he is enjoying sharing his expertise whenever possible :).
He is working as a presales expert in Micro Focus serving the international community.

View all posts by Mahmoud Ibrahim (admin)
Previous Article
Next Article