从VHD文件启动计算机

/*??????Aviraj Ajgekar???????????*/

????????Windows 7?VHD???????,????VHD??????????:-) ??????????????????????????

????,?????????????,????????????U?????????????????VHD???Windows 7????????????,?????????VHD????????

 

???????Windows 7????????????VHD???????,?????Windows 7????(Boot Loader)?????,??????BCDEdit???,?VHD???????????????????????

 

?????????????:

??,?????????????????????VHD?????????????????????VHD??,????????????:

1. ?Virtual PC??Hyper-V?????,????sysprep,????,???VHD?????Windows 7?Boot Loader???

2. ??ImageX??,??????????????(ImageX??)???VHD??

??????????,?Aviraj Ajgekar???????????

 

Adding the VHD Entry in Boot Menu and then Boot from VHD

??????VHD?????VHD?????????????,??????Windows 7?BCDEdit?????????????:

C:\>bcdedit /copy {current} /d "My New VHD Description"

Note: This will Return the GUID of the Loader Object that you will use to replace <guid> below
C:\>bcdedit /set <guid> device vhd=[driveletter:]\<directory>\<vhd filename>
C:\>bcdedit /set <guid> osdevice vhd=[driverletter:]\<directory>\<vhd filename>

Note: vhd=[driveletter:]\<directory>\<vhd filename> is the new syntax supported for BCDEdit.exe to locate VHD File and Bootmgr will locate the partition containing the VHD File to boot from.
C:\>bcdedit /set <guid> detecthal on

Note:

Following is the attached screenshot of the my machine. In this case I have Windows 7 as the default OS and I have added the VHD File in the Boot Entry.

bcd

Well just after that run the following command to test if your boot entry is successfully created using C:\>bcdedit /v

image

Similarly, if you want to add multiple VHDs into Boot entry you can use the following lines to the command prompt

C:\>bcdedit /copy {current} /d "New VHD Description"
C:\>bcdedit /set <guid> device vhd=[driveletter:]\<directory>\<vhd filename>
C:\>bcdedit /set <guid> osdevice vhd=[driverletter:]\<directory>\<vhd filename>
C:\>bcdedit /set <guid> detecthal on

Note:   detecthal is used to force windows to auto detect the Hardware Abstraction Layer.

If you want to delete any existing VHD entry from the Boot Menu you can always use the command C:\>bcdedit /delete <guid> /cleanup This deletes the specified operating system entry from the store and removes the entry from the display order.

Well, we are ready to Boot from VHD. Once you restart the computer you will see additional entry in Boot Menu along with the default Windows 7 or Windows Server 7 OS.

Here is the screenshot from newly booted Windows Server 2008 R2 Beta from VHD. I have installed Desktop Experience Pack and enabled Aero Glass.

win 7 server

????,?????????:?VHD???????,??????????????????????????VHD??,???????????????????????????????:

 

1. Windows 7??????Windows 7???????VHD?????????,???????????????,??VHD???????;??????Windows 7???????????VHD???????VHD???????,?Virtual PC??Hyper-V??????????Windows 7?????????????

2. ?VHD????,??????????????,????????????

3. ????????,??????????????,?????????VHD???????,?????????I/O????,???????????,????????????????????,????????????VHD???,????????????:

image

4. ???VHD???????Windows 7?,???????Windows 7???VHD??????VHD?????????

 

????????????????????,??????????????????????