我已经安装了Docker,当我运行GUI时,我得到这个错误:

硬件辅助虚拟化和数据执行保护必须 在BIOS中启用

似乎是一个bug,因为Docker在命令行中工作得很好,但我想知道是否有人知道为什么会发生这种情况?

在你问之前,是的,我已经在BIOS中启用了虚拟化,并且英特尔处理器识别实用程序确认它已被激活。Docker, Docker -machine和Docker -compose都可以在命令行中工作,Virtualbox可以,在Debian或Ubuntu虚拟机中运行Docker也可以。

GUI有个奇怪的问题。

我的规格:

Windows 10 Pro x64周年纪念版 英特尔酷睿i5-6300HQ @ 2.30GHz


当前回答

以下是我的工作方案,请按照以下步骤进行

以管理员身份打开PowerShell或以管理员身份打开CMD提示符 在PowerShell-> bcdedit /set hypervisorlaunchtype auto . sh中执行该命令 现在重新启动系统并重试。

欢呼。

其他回答

遵循以下步骤:

进入:windows设置=>更新和安全=>恢复=>高级启动,然后单击:立即重新启动。 故障排除=> Advanced Option => UEFI Firmware =>重启。 进入“Bios => configuration => Virtualization technology =>”。 保存更改,它就会工作。

我在安装VMWare后也遇到了同样的问题,我卸载了它,但这并没有解决问题。

我的解决方案:在“打开或关闭窗口功能”中,我关闭了:

hyper - v 容器 Windows Linux分系统

然后重新启动

重启后,我从docker得到了这条消息:

我执行了消息中说的命令

Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

然后重新启动和voilà, Docker就带着WSL2回来了

I don't know how this works, and I don't even know what these commands do, I don't know what is hypervisor or what it does that it interferes with Docker, and I don't know what the nx means in the second command which it is apparently turning it off. I had these commands saved on my computer as "Turn VT-x off" (yet another thing that I don't know what it is, I think it's related to Virtualization Technology which I don't know what that does/is either). But nothing else worked for me (including the accepted answer (which I tested all of it's solutions) and other upvoted answers, although I didn't read all of them), except running both of these. It is completely up to you to test these, I do not guarantee any fixes to you, but it worked for me, I put it in here because I thought it might be helpful for someone else like me who also didn't find other answers to be that helpful:

bcdedit /set hypervisorlaunchtype auto

bcdedit /set nx AlwaysOff

shutdown /s

您可以尝试手动启用Hyper-V,并手动创建和运行Hyper-V虚拟机吗?细节:

https://docs.docker.com/docker-for-windows/#/what-to-know-before-you-install https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install

如果上述方案不奏效,那么 进入命令提示符并输入systeminfo。检查Hyper-V要求部分。 如果列出的所有Hyper-V需求的值都为Yes,则系统可以运行Hyper-V角色。 在我的情况下,固件中的虚拟化启用是NO。 因此,我在系统bios中启用了虚拟化技术,在我的惠普笔记本电脑中启用了虚拟化技术。 请按此连结启用: https://2nwiki.2n.cz/pages/viewpage.action?pageId=75202968