Last time, we
created a VHD image with Window 7 for Virtual PC . It is clear that in a virtual environment, of course, there are advantages, but nevertheless, I would like everything to work more brightly ...
In the case of Window 7, I would also like to see it in all its glory, at least with the aero-interface running.
Next, we will discuss how to boot from the resulting VHD image along with the installed base system. That is, to work with the system, you do not need a separate partition and you will not need to demolish the existing system, Win 7 will still be stored inside the VHD file, but at the same time it will be running in a real environment.
')
Note: this method, by default, works in Windows 7 and Windows Server 2008 R2, I will tell you how to make it work on Vista (see clause 1).0. If you have a virtual image (.vhd file) created as an image with a dynamic size, have lunch that you have free space in the system in the maximum size for this image.
1. First of all, we need two files: bootmgr (a new boot manager that can boot from VHD) and bcdedit.exe (a new version of the program for editing boot records).
The first one can be taken from the installation disk, the second one can be taken from the installed Windows 7 system (for example, it can be pulled out from the VHD-image in hand). Or you can just download
from here (skydrive) :)
Next, you will have to
rewrite the file
c: \ bootmgr . File
c: \ windows \ system32 \ bcdedit.exe , in principle, you can not overwrite (just run from another location). Just in case, I recommend to keep the old versions.
Note: for rewriting, you may need full ownership rights to the files.2. Open the console (cmd) with admin rights, just in case, make a copy of the current records and simultaneously create a new record:
bcdedit / copy {current} / d “Windows 7”The command will return the GUID of the newly created entry.
3. Next, you need to register the address with the VHD-disk to download
bcdedit / set {GUID} device vhd = [c:] \ vhd \ win7b.vhdbcdedit / set {GUID} osdevice vhd = [c:] \ vhd \ win7b.vhd4. If you want the added system to be the last in the OS list at boot time, you need to run the following command
bcdedit / displayorder {GUID} / addlastThe record with the corresponding GUID is transferred to the end (in this way, any desired order can be achieved).
5. If you want to change the system name when booting, you need to run the following command
bcdedit / set {GUID} description “Windows 7 - VHD”6. To force automatic detection in Windows of a disk through the appropriate level of abstraction - Hardware Abstraction Layer — the following command should be executed
bcdedit / set <guid> detecthal onDone! You can reboot. After booting, Windows 7 will start installing the necessary drivers for your real hardware. Ask to reboot. After that, you can work normally. With Aero!


If you look at the disks present in the system, you will see that in addition to the 16 GB virtual disk (circled in orange), from which Win7 is actually loaded, there is also a second section of the 200 MB virtual disk for system files and a real (!) Hard disk drive. disk installed on the computer.

If you open a real disk and see where the file with the image of the system

You may find that the file size has increased to 16 GB. The fact is that our VHD-image was automatically converted into an image with a fixed size, that is, it took the maximum possible 16 GB. It speeds up the system.
It is also worth noting that this image can still be downloaded via Virtual PC.