Fix “Hardware assisted virtualization and data execution protection must be enabled in the bios”

Recently have experienced the Docker error which was basically, “Hardware assisted virtualization and data execution protection must be enabled in the BIOS. See https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled”. After the error, I went on the internet to find the answer and got a few.

With some search, I understood that there is quite a clear guide on how to fix it which can be a problem for users, to fix that here is how to Fix “Hardware assisted virtualization and data execution protection must be enabled in the bios”.

How to fix the hardware assisted virtualization and data execution?

hardware assisted virtualization and data execution protection
hardware assisted virtualization and data execution protection

Before we begin, let’s make sure that you have enabled your Virtualization. If you haven’t then I would recommend you to enable it and check for errors again. There is also a slight chance that you are experiencing the error due to conflict with your Anti-Virus.

Tip: Users might find it challenging to enable Virtualization on AMD or VT, so here is “How to Enable VT-x or AMD-v in BIOS or UEFI Firmware”.

Restart your anti-virus and check your system for the error. If none of the two methods above fixed the error then you are going to use the other method below:

Note: the docker is only available on Windows 10 Enterprise, Windows 10 Professional, and Windows 10 Education editions. Using it on other editions like Windows 10 Home, you will experience errors due to incompatibility.

Method 1: Enable Hyper-V on Windows 10

There are going to be three different ways to fix the “Hardware assisted virtualization and data execution protection must be enabled in the BIOS.” error. One of the first ones will be to enable the Hyper-V.

I have discussed thoroughly enabling the Hyper-V on Windows 10 here. However; for those who want a quick answer, they can run PowerShell or CMD (command prompt) as administrators.

Then they are going to type the command below on PowerShell or CMD.

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

Once the Hyper-V is enabled, then you are going to restart your system. Again, check your system for error, if still found then apply the second method.

Related: users who are using BlueStacks, might experience some issues after enabling virtualization. So, here is something related that will also help you to fix the error. Should I Enable Virtualization for BlueStacks and is there any fix for the errors?

Method 2: Enable Hyper-Visor for fixing hardware-assisted virtualization

Here you will enable the Hyper-Visor for fixing the error. For this, you are going to run CMD or PowerShell as administrator again.

Then you will paste the command below as:

bcdedit /set hypervisorlaunchtype auto.

The command given will enable the Hyper-Visor on your Windows 10. Now you are going to restart your system and check for the error.

I am quite sure that you have fixed the error, however; if you are still experiencing the error then you are going to use the last tool.

Method 3: Disable then Enable Hyper-V and Hyper-Visor

The last option is to disable the Hyper-V features that you have enabled at the start. Once disabled, then you will enable it again. However; this time you will use the GUI instead of command lines on CMD or PowerShell.

Navigate through Control Panel >Programs > Programs and Features. Now select Turn Windows features ON or OFF.

turn windows features on or off- enable Hyper-V
turn windows features on or off- enable Hyper-V

Here you will scroll down and find the Hyper-V section. There you will unmark the checkboxes and click on OK. This is will disable the Hyper-V and all its components.

Tip: it is recommended to restart your system and then continue to the next step.

Again, navigate and find the Hyper-V in Turn Windows features ON or OFF. Select all the Hyper-V components and click on OK to enable it.

Last words on “hardware assisted virtualization and data execution protection”:

Mostly you will experience the error due to Docker having issues, either with your Windows OS or components inside. You will avoid the error by enabling the features.

However; there are some applications such as Intel HAXM and VirtualBox which don’t work well with Docker. To avoid the error, you will need to remove them from your system.

There are also moments when users have not enabled a few features during the installation of the Docker Desktop and have experienced the issues after applying the methods above. Instead, they will need to reinstall Docker Desktop, and select the Use Windows containers instead of Linux containers (this can be changed after installation) option to avoid the error during the installation.

You may also like...

Leave a Reply

Your email address will not be published.

%d bloggers like this: