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

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

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

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

GUI有个奇怪的问题。

我的规格:

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


当前回答

@Silverstorm

我在BIOS中安装了Hyperv并启用了虚拟化。

但是A方案并不适合我。

然而,解决方案B非常有效。

解决方案B(如果Hyper-V功能已经启用但不工作)

使用

Bcdedit /set hypervisor启动类型auto 现在重新启动系统并重试。

其他回答

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

在我的情况下,虚拟化是禁用的,所以我需要在我的bios中做一些配置,

请检查以下链接,我认为它将帮助您进行bios设置

https://support.bluestacks.com/hc/en-us/articles/4409279876621-How-to-enable-Virtualization-VT-on-Windows-11-for-BlueStacks-5

在bios的设置取决于你的系统制造,所以请找到相应的设置。

希望它能帮助你,节省你的时间。

谢谢:)

我卸载了英特尔HAXM和VirtualBox, Docker现在运行

它帮助了我:

禁用组件虚拟机平台和Windows子系统for Linux 重新启动 使组件 重新启动

我认为我的问题与WSL2的beta版本有关。 我尝试安装android子系统。但是我前一段时间已经删除了。所以只剩下beta 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