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

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

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

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

GUI有个奇怪的问题。

我的规格:

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


当前回答

通过“设置”开启Hyper-V角色 右键单击Windows按钮/图标,选择“应用程序和功能”。

1-选择右侧相关设置下的“程序和功能”。

2-选择“打开或关闭Windows功能”。

2-选择“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

通过“设置”开启Hyper-V角色 右键单击Windows按钮/图标,选择“应用程序和功能”。

1-选择右侧相关设置下的“程序和功能”。

2-选择“打开或关闭Windows功能”。

2-选择“Hyper-V”,单击“确定”。

在AMD机器上,你必须更改的BIOS设置可能被称为SVM模式。我的Gigabyte X570板子就是这种情况。

BIOS中的设置如下:高级模式—> tweak—>高级CPU设置—>支持向量机模式(设置为enabled)

AMD-V是安全虚拟机模式(SVM)的重命名商标。

对我来说,在BIOS中禁用然后启用虚拟化是有帮助的,奇怪的是。

尝试在PowerShell(启用管理员):

Enable-WindowsOptionalFeature –Online -FeatureName Microsoft-Hyper-V –All -NoRestart

这将在没有管理工具的情况下安装HyperVisor,然后您可以在此之后运行Docker。