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
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.
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.