最近拿到了新的笔记本电脑X201i,并且配置有8GB内存,心想:这下做实验不用担心虚拟机内存资源不足的问题了,使用Hyper-V虚拟化技术发挥它最大的效能,因此规划安装Windows Server 2008 R2的操作系统,此时有同事建议使用原生启动Windows Server 2008 R2的系统同样可以运行Hyper-V的虚拟机,完全没有必要全新安装Windows Server 2008 R2,我决定采纳同事的建议,开始尝试使用原生启动运行Windows Server 2008 R2并且运行Hyper-V的虚拟机。
思路:
Ø 了解能够运行Native Boot的要求:VHD 文件只支持Win7或Windows server 2008及以上虚拟机,支持动态、差异、固定大小三种磁盘类型格式。
Ø 准备Native Boot需要使用到的VHD文件;
Ø 开始编辑现有系统的启动文件;
Ø 成功的原生启动Windows Server 2008 R2后,开始安装Hyper-V工具;
开始测试:
1) 准备VHD文件,VHD的文件的来源基本是两种途径,一种是使用VPC或Hyper-V创建的带有系统的VHD文件,一种是使用DISKPART命令结合ImageX命令创建VHD文件;
在此,我使用的是第二种方法:
DISKPART命令如下:
diskpart
createvdisk file=e:\ws08r2.vhd maximum=20480 type=expandable
selvdisk file=e:\ws08r2.vhd
attachvdisk
create partition primary
formatfs=ntfs quick label=WS08R2
assign letter=v
IMAGEX命令如下:
imagex /apply e:\install.wim 1 v:
2) 编辑现有的系统启动文件,使用BCDEDIT命令,详细命令如下:
bcdedit /copy {current} /d "Windows Server 2008 R2 Standard Edition"
bcdedit /set {f7b14390-4541-11e0-9aa8-c6d7309c4b9e}device vhd=[e:]\ws08r2.vhd
bcdedit /set {f7b14390-4541-11e0-9aa8-c6d7309c4b9e} detecthal on
bcdedit /set {f7b14390-4541-11e0-9aa8-c6d7309c4b9e} hypervisorlaunchtype auto
3) 重新启动,进入Windows Server 2008 R2的系统,然后添加Hyper-V管理工具,进入后你可以看到原有系统磁盘的变为如下图所示:
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26006535/viewspace-701866/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26006535/viewspace-701866/