windows10家庭版安装Hyper-V

1.在桌面创建文本文件,命名为Hyper-V.cmd

2.将以下内容复制到创建的文本中,保存并关闭

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

3.在桌面上找到文件,右键点击,选择“以管理员身份运行”,运行后,自动打开命令行执行相关命令,执行到最后根据提示让输入Y或N,输入Y,重启电脑。

4.重启成功,Hyper-V安装完成。

安装docker时报错,需要再安装windows容器

1.创建文本文件,命名为containers.bat

2.将以下内容复制到创建的文本中,保存并关闭

pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt
for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del containers.txt
Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL
pause

3.在桌面上找到文件,右键点击,选择“以管理员身份运行”,运行后,自动打开命令行执行相关命令,执行到最后根据提示让输入Y或N,输入Y,重启电脑。

4.重启成功,windows容器安装完成。

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值