目录
收起
一、安装Hyper-V
二、启用Hyper-V
Hyper-V是Windows专业版专属功能,但大多数(除商业本)品牌机内置的Windows都是家庭版。只能通过命令开启,方法如下:
Windows专业版请直接阅读启用Hyper-V部分
一、安装Hyper-V
a.在桌面空白处右键-新建-文本文档,命名为 hyper-v.cmd,如图1-1
(提示:必须开启显示文件扩展名选项,否则无效,开启方法参考图1-2)




b.单击这个文件,右键-显示更多选项-编辑,如图1-3


c.输入以下代码,如图1-4
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL


d.点击文件-保存,如图1-5


e.单击这个文本文档,右键-以管理员权限运行,如图1-6


f.等待加载完成即可,成功安装后,输入y并回车即可
二、启用Hyper-V
a.点击搜索按钮,输入控制面板,并点击打开,如图2-1


b.点击程序与功能,如图2-2


c.点击启用或关闭Windows功能,如图2-3


d.勾选Hyper-V,Windows虚拟机监控程序平台和虚拟机平台,如图2-4,2-5




e.点击确定,如图2-6


f.点击不重新启动即可