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

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

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

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

GUI有个奇怪的问题。

我的规格:

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


当前回答

我也用vagrant。看来我一次只能用一件东西。卸载vagrant/virtualBox允许我运行docker,反之亦然

其他回答

I have tried many suggestions above but docker keeps complaining about hardware assisted virtualization error. Virtualization is enabled in BIOS, and also Hyper-V is installed and enabled. After a few try and errors, I eventually downloaded coreinfo tool and found out that Hypervisor was not actually enabled. Using ISE (64 bit) as admin and run command from above Solution B and that enables Hypervisor successfully (checked via coreinfo -v again). After restart, docker is now running successfully.

我尝试了这里的许多建议,但都没能让它运行起来。最后对我有用的是直接进入BIOS激活它。下面的文章很有帮助: https://www.nextofwindows.com/how-to-enable-configure-and-use-hyper-v-on-windows-10

如果启用了所描述的特性,则问题在于Hyper-V被禁用或Hypervisor代理未运行。

解决方案A(如果Hyper-V完全禁用或未安装)

以管理员身份打开PowerShell 启用Hyper-V dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

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

使用

bcdedit /set hypervisorlaunchtype auto

现在重新启动系统并重试。

解决方案C

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

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

注1:

Hyper-V needs hardware virtualization as prerequisite. Make sure your PC supports it, if yes and still won't work, there is the possibility your BIOS is not configured correctly and this feature is disabled. In this case, check, enable it and try again. The virtualization features could be reported under different names according the platform used (e.g if you don't see any option that uses virtualization label explicitly, on AMD you have to check SVM feature state, on Intel the VT-x feature state).

注2:

Hyper-V只能安装某些版本,例如:

Windows 10企业版;Windows 10 Professional;Windows 10教育。

Hyper-V不能安装在便宜的或移动的Windows版本上,例如:

Windows 10家庭版;Windows 10 Mobile;Windows 10移动企业。

在我的例子中,我必须在BIOS设置中启用虚拟化。

重新启动电脑 当你在“重启”屏幕上按下这些键中的任何一个,你进入windows中的bios设置:esc, f1, f2, f3, f4, f8或delete 对于基于英特尔的系统: 按f7(高级模式) 转到高级 注册会计师的配置 支持虚拟化

在以上所有步骤之后,它终于工作了:-)

它帮助了我:

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

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