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

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

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

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

GUI有个奇怪的问题。

我的规格:

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


当前回答

2023年1月10日,我遇到了同样的问题。在那之后,我取消了Linux和Hyper-v的windows子系统,重新启动我的电脑。然后我打开docker桌面,当它通知我打开Hyper-v时,我就这样做了,在那之后,它工作得很好。

其他回答

打开任务管理器并单击性能选项卡。如果禁用了虚拟化,您需要按照以下说明启用它:https://blogs.technet.microsoft.com/canitpro/2015/09/08/step-by-step-enabling-hyper-v-for-use-on-windows-10/

在我的情况下,我不得不卸载hyper-v,重新启动pc,并再次运行docker。

如果问题仍然存在,可能是系统上的Hyper-V损坏了,所以

进入控制面板->[程序]-> [Windows功能],完全取消选中所有Hyper-V相关组件。重新启动系统。

再次启用Hyper-V。重新启动。

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

遵循以下步骤:

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