且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Docker for Windows错误:必须在BIOS中启用“硬件辅助虚拟化和数据执行保护”

更新时间:2022-10-15 11:20:27

如果所描述的功能被启用,则Hyper-V被禁用或者没有运行管理程序代理的问题。



以管理员身份打开PowerShell,


  1. 使用

    启用Hyper-V

    dism.exe / Online / Enable-Feature:Microsoft-Hyper -V / All



  1. 启用管理程序



    bcdedit / set hypervisorlaunchtype auto


现在重新启动系统,然后重试。



如果问题仍然存在,Hyper-V将在您的系统已损坏,因此


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


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


注意:
Hyper-V需要硬件虚拟化作为先决条件。确保您的PC支持它,如果是,仍然不工作,那么您的BIOS配置不正确,此功能被禁用。在这种情况下,请检查,启用它并重试。


I've installed Docker and I'm getting this error when I run the GUI:

Hardware assisted virtualization and data execution protection must be enabled in the BIOS

Seems like a bug since Docker works like a charm from the command line, but I'm wondering if anyone has a clue about why this is happening?

Before you ask, yes, I've enabled virtualization in the BIOS and the Intel Processor Identification Utility confirms that it's activated. Docker, docker-machine and docker-compose all work from the command line, Virtualbox works, running Docker from a Debian or Ubuntu VM works.

There's just this weird issue about the GUI.

My specs:

  • Windows 10 Pro x64 Anniversary Edition
  • Intel core i5-6300HQ @ 2.30GHz

If the features described are enabled the problem is with Hyper-V that is disabled or Hypervisor agent not running

Open PowerShell as administrator and

  1. Enable Hyper-V with

    dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

or

  1. Enable Hypervisor with

    bcdedit /set hypervisorlaunchtype auto

Now restart the system and try again.

If the problem persist probably Hyper-V on your system is corrupted, so

  1. Go in Control Panel -> [Programs] -> [Windows Features] and completely uncheck all Hyper-V related components. Restart the system.

  2. Enable Hyper-V again. Restart.

NOTE: Hyper-V needs hardware virtualization as prerequisite. Make sure your PC support 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.