解决Docker 启动失败问题,Docker Desktop is unable to detect a Hypervisor.

 1.确认是否开启Hyper-V

win11:进入控制面板->程序->启用或关闭windows功能->勾选Hyper-V

 2.如果找不到Hyper-V:windows自动隐藏了该功能,设置开启hyper-v。

桌面新建一个记事本文件,将它的后缀改成cmd或bat,复制下面的代码

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.如果看到已开启了Hyper-V,还启动不了

管理员运行cmd输入,然后重启电脑

bcdedit /set hypervisorlaunchtype auto

4.成功!!!

猜你喜欢

转载自blog.csdn.net/weixin_47190898/article/details/131060441