331

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
0

30 Answers 30

576

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

SOLUTION A (If Hyper-V is totally disabled or not installed)

  1. Open PowerShell as administrator and

  2. Enable Hyper-V with

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

SOLUTION B (If Hyper-V feature is already enabled but doesn't work)

Enable Hypervisor with

bcdedit /set hypervisorlaunchtype auto

Now restart the system and try again.

SOLUTION C

If the problem persists, 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 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).

NOTE 2:

Hyper-V can be installed only with some version e.g.:

Windows 10 Enterprise; Windows 10 Professional; Windows 10 Education.

Hyper-V cannot be installed on cheaper or mobile Windows versions e.g.:

Windows 10 Home; Windows 10 Mobile; Windows 10 Mobile Enterprise.

27
  • 3
    @Julien try to unistall and reinstall Hyper-V see the edit Oct 13, 2016 at 13:49
  • 5
    In case anyone else has a similar issue, I had recently installed Bash on Ubuntu on Windows (which uses Hyper-V). After I uninstalled it and then followed the steps in this answer, Docker worked for me! Oct 27, 2016 at 18:07
  • 20
    I'm running Windows 10 in Bootcamp on MacBook Pro. I had the same problem. I first tried dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All but didn't seem to solve it, so then I tried bcdedit /set hypervisorlaunchtype auto and Docker is now running for me. Nov 15, 2016 at 1:27
  • 2
    This wasn't the issue in my case, it was the fact that the virtuallization was disabled in the BIOS. I had to enable the virtualization feature in the security tab in the BIOS, which caused docker to work immidiately afterwards.
    – shahar_m
    Jan 11, 2017 at 9:14
  • 5
    Solution B worked for me after upgrading/switching my SSD via the Samsung SSD Migration Tool.
    – plocks
    Feb 28, 2019 at 15:09
58

Below is working solution for me, please follow these steps

  1. Open PowerShell as administrator or CMD prompt as administrator

  2. Run this command in PowerShell-> bcdedit /set hypervisorlaunchtype auto

  3. Now restart the system and try again.

cheers.

3
  • 6
    Worked for me, without uninstalling Intel HAXM, but now vmware no more works :(
    – realtebo
    Jul 1, 2018 at 12:52
  • 1
    Thanks. This solution worked for Windows 10 Home.
    – NewBee
    Dec 19, 2020 at 22:04
  • 1
    after an hour of trying everything (even Windows documentation) this worked for me on windows 10 home as well. Jan 25, 2021 at 8:17
36

In my case I had to enable virtualization in the BIOS setting.

  1. Restart PC
  2. While you are on the 'restart' screen press any of these keys and you enter the bios settings in windows: esc, f1, f2, f3, f4, f8 or delete
  3. For intel based systems:
    • press f7 (advanced mode)
    • go to advanced
    • cpa configuration
    • enable virtualization

And after all above steps, it finally works :-)

3
  • I had to do the same. I think this is the hard way but it works for sure
    – Carloshf
    Jan 28, 2021 at 9:47
  • 1
    you sir, are a hero! worked like a charm :)
    – Dardar
    Aug 9, 2021 at 7:15
  • This is the one that worked for me. Many thanks.
    – Mitya
    Mar 11, 2022 at 13:51
14

Note: If your version of Windows supports Hyper-V, you can install docker directly by selecting Use Hyper-V during installation. However, if your Windows does not have this support, follow the solution below.


I had a similar problem. I have enabled Intel Virtual Technology in the bios settings.

enter image description here

Then I updated the Linux kernel from here. and it worked

My specs:

  • Microsoft Windows 10 Home x64 Single Language
  • Intel(R) Core(TM) i5-7300 @ 2.50GHz
13

I uninstalled Intel HAXM and VirtualBox, Docker now runs

2
  • 17
    I had installed HAXM for Android Development, and had to disable HyperV. Removing it restored Docker for Windows. Now if anyone can tell me how to get the Android Emulator and Docker to coexist? Oct 3, 2017 at 18:47
  • 1
    itwriting.com/blog/… Oct 3, 2017 at 18:49
9

For me, all I had to do it uninstalling VMware.

Docker now is running

6

Open the task manager and click on the performance tab. If virtualization is disabled, you need to follow the instructions here to enable it: https://blogs.technet.microsoft.com/canitpro/2015/09/08/step-by-step-enabling-hyper-v-for-use-on-windows-10/

0
4

Try these steps

  1. Run this command in powershell
    bcdedit /set hypervisorlaunchtype
    auto
    
  2. Restart your PC
  3. Now try docker --version in cmd line
1
  • seems to work and I can still use VMWare so thank you
    – J.erome
    Mar 9, 2021 at 10:00
3

Can you try enabling Hyper-V manually, and potentially creating and running a Hyper-V VM manually? Details:

1
  • 3
    For me it didn't work even when Hyper-V was enabled and BIOS configured; I was still getting that error. Disabling Hyper-V + restarting Windows and then enabling it back on solved the problem for me.
    – Tadej
    Sep 30, 2016 at 3:50
3

Enable the Hyper-V role through Settings Right click on the Windows button/Icon and select ‘Apps and Features’.

1- Select Programs and Features on the right under related settings.

2- Select Turn Windows Features on or off.

2- Select Hyper-V and click OK.

enter image description here

2
  • Hyper-V platform is grayed out and says: Virtualization support is disabled in the firmware.
    – Fanky
    Feb 4, 2022 at 10:23
  • The grayed-out problem mentioned above is solved by checking both Virtualizations in BIOS -> Advanced
    – Fanky
    Feb 4, 2022 at 10:32
3

If solution above does not work, then Go to command prompt and type systeminfo. check Hyper-V Requirements section. If all listed Hyper-V requirements have a value of Yes, your system can run the Hyper-V role. In my case virtualization enable in Firmware was NO. So, I did enabled in system bios by making Virtualization Technology enabled in my HP laptop. Please visit this link to enable it: https://2nwiki.2n.cz/pages/viewpage.action?pageId=75202968

3

follow the steps bellow:

  1. go to: windows setting => Update & Security => Recovery => Advanced Startup and click on : Restart Now.
  2. Troubleshoot => Advanced Option => UEFI Firmware => Restart.
  3. go to Bios => configuration => Virtualization technology => enable it.
  4. save change and it will works.

1 step

step 2

2

In my case I had to uninstall hyper-v, restart pc, and run docker again.

2

Try this in PowerShell(admin enabled):

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

This will install HyperVisor without management tools, and then you can run Docker after this.

2

I also use vagrant. It appears I can only use 1 thing at a time. Uninstalling vagrant/virtualBox allowed me to run docker and vise versa

2

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.

2

If everything is fine with BIOS option I just forced disabling and enabling all HyperV features and this solved my issue --cmd Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All --restart Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All

1
  • HP zbook. BIOS was correct/enabled, Virtualization was enabled in task manager, accepted command line solutions didn't work, I kept getting the same message in Docker. This finally did the trick.
    – Ralpharama
    Sep 20, 2022 at 9:01
2

In my case even though I used all the solutions mentioned above but nothing worked for me. So I decided to uninstall docker and install it again.

Now in the process, I have noticed that I did not check Use Windows containers instead of Linux containers (this can be changed after installation) in my previous installation, and that is why I got the problem above and the solutions still did not fix it. So ensure to check it before you run desktop docker or uninstall it and install it again by checking this option.

Docker Installation Process

2
  • This option no longer exists when installing Docker Desktop. I’ve tried all solutions listed here, nothing is working, even though Task Manager > Performance is showing that virtualisation is enabled.
    – dazonic
    Mar 17, 2021 at 12:38
  • I have done this just last year with windows 10. Mar 17, 2021 at 13:48
2

I had the same issue after installing VMWare, I uninstalled it but this didn't fix the issue.

Solution for me: in "Turn windows features on or off" I turned off:

  • hyper-v
  • containers
  • windows subsystem for linux

then restart

After the restart I got this message from docker:

enter image description here

I ran the ran the command as said in the message

Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

Then restart and voilà, Docker was back with WSL2

2

For me, disabling and then enabling Virtualisation in BIOS helped, strangely.

1
  • Not an exact science but strangely enough this did it for me as well
    – tijko
    Apr 22, 2022 at 18:20
2

It helped me:

  • Disable components Virtual Machine Platform and Windows Subsystem for Linux
  • Restart
  • Enable components
  • Restart

I think my problem was related to beta version of WSL2. I tried to install android subsystem. But I have deleted it some time ago. So, there was only beta WSL2 left

1

Issue for me was solved when I uninstalled Cygwin.

1

I tried many of the suggestions here, but did not manage to get it running. What worked for me in the end was to go straight in to the BIOS to activate it. The following article was of great help: https://www.nextofwindows.com/how-to-enable-configure-and-use-hyper-v-on-windows-10

1

@Silverstorm

I had Hyperv installed and virtualization enabled in my BIOS.

But SOLUTION A didn't work for me.

However, SOLUTION B worked like a charm.

SOLUTION B (If Hyper-V feature is already enabled but doesn't work)

Enable Hypervisor with

bcdedit /set hypervisorlaunchtype auto Now restart the system and try again.

1

Besides the original answer, I have done the following:

  • Disable Hyper-V in Windows Features
  • Turning virtualization off and on in BIOS
  • Log back in windows, enabled Hyper-V. I was prompted there are updates for Hyper-V and I did the update. Restart when prompted.
  • It worked!
1

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

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

Enable Hyper-V again. Restart.

1

In my case virtualization is disabled so I need to do some configuration in my bios,

Please check following link I think it will help you to make bios setup

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

In bios the setting are dependent on your system manufacture so please find setting accordingly.

Hope it will help you and save your time.

Thanks :)

1

On AMD machines the BIOS setting you have to change might be called SVM Mode. That was the case for my Gigabyte X570 board.

Setting is found in BIOS at: Advanced mode -> Tweaker -> Advanced CPU Settings -> SVM mode (set to enabled)

AMD-V is the renamed trademark for Secure Virtual Machine Mode (SVM).

1
  • Spot on! This was the case for me
    – JosF
    Jan 9 at 22:08
0

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
0
0

On 10th Jan'2023, I faced the same issue. After that, I untick windows subsystem for Linux and Hyper-v and restart my pc. Then I open the docker desktop and when it notify me to turn on Hyper-v then I did that and after that, it was working well.

Not the answer you're looking for? Browse other questions tagged or ask your own question.