win10专业版没有找到Hyper-y,安装Hyper-y

因为没有开启hyper-V服务,直接安装docker,会报hyper-v feature is not enabled错误

安装Hyper-V

1、新建Hyper-V.cmd文件

2、打开

3、复制一下代码,保存

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

4、右键Hyper-V.cmd文件,选择以管理员身份运行

5、自动弹出小黑框,等待下载,安装,切勿关闭

6、提示输入y/n,输入y即可。

7、win+q 如下图

即可看到hyper-v管理器,安装成功!

 重新安装docker报Containers Windows Feature is not available错误

安装Containers

新建一个containers.bat,内容如下:

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

保存后右键使用管理员权限运行
等待containers安装完成后重启,然后再安装Docker for Windows即可

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值