Docker for Windows error: "Hardware assisted virtualization and data execution protection must be enabled in the BIOS" - windows

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.
SOLUTION A (If Hyper-V is totally disabled or not installed)
Open PowerShell as administrator and
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
Go in Control Panel -> [Programs] -> [Windows Features] and completely uncheck all Hyper-V related components. Restart the system.
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.

Below is working solution for me, please follow these steps
Open PowerShell as administrator or CMD prompt as administrator
Run this command in PowerShell-> bcdedit /set hypervisorlaunchtype auto
Now restart the system and try again.
cheers.

In my case I had to enable virtualization in the BIOS setting.
Restart PC
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
For intel based systems:
press f7 (advanced mode)
go to advanced
cpa configuration
enable virtualization
And after all above steps, it finally works :-)

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

I uninstalled Intel HAXM and VirtualBox, Docker now runs

For me, all I had to do it uninstalling VMware.
Docker now is running

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/

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

Try these steps
Run this command in powershell
bcdedit /set hypervisorlaunchtype
auto
Restart your PC
Now try docker --version in cmd line

Can you try enabling Hyper-V manually, and potentially creating and running a Hyper-V VM manually? Details:
https://docs.docker.com/docker-for-windows/#/what-to-know-before-you-install
https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install

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.

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

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

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

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.

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

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.

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

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.

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

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

Issue for me was solved when I uninstalled Cygwin.

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

#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.

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!

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.

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 :)

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).

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

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.

Related

I was trying vagrant up and I had this error [duplicate]

Downloaded Xamarin Android Player and with >>next>> progress installed Virtual Box.
When I tried to start an emulator I got
Failed to initialized device (name Of the emulator)
VboxManager Commendt Failed
and the detail of the error in Oracle Vm Virtualbox is
VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
How can I fix this?
I have found the solution of my problem, put some images to help others, thanks
go here
It is a RAM related issue. The documentation is self explanatory:
You are trying to allocate >3GB of RAM to the VM. This requires: (a) a
64 bit host system; and (b) true hardware pass-through ie VT-x.
Fast solution
Allocate less than 3GB for the virtual machine.
Complete solution
Make sure your system is 64 bit.
Enable virtualisation in your host machine. You can find how to do it here or there are many other resources available on Google.
Turning PAE/NX on/off didn't work for me. I just needed to turn on virtualization on my computer. I was working on a HP Compaq 8200 and followed the steps below to turn on virtualization. If you are working on a different computer, you probably just need to look up how to turn on virtualization on your pc. The steps below for HP Compaq 8200 (or similar) is copied verbatim from the comment posted by the user qqdmax5 on Hp discussion board here.
To run Oracle VM Virtual Box / VMware machines on 64-bit host there is a need to enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Usually these setting are disabled on the level of BIOS.
To enable VTx and VTd you have to change corresponding settings in the BIOS.
Here is an example how to do it for HP Compaq 8200 or similar PC:
Start the machine.
Press F10 to enter BIOS.
Security-> System Security
Enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Save and restart the machine.
There is also some discussion on this on askubuntu.
In Virtual Box "Settings" > System Settings > Processor > Enable the PAE/NX option. It resolved my issue.
I had this issue when tried to run a 32-bit OS with more than 3584 MB of RAM allocated for it. Setting the guest OS RAM to 3584 MB and less helped.
But i ended just enabling the flag in BIOS nevertheless.
Follow the steps below in Oracle VM VirtualBox Manager:
Select the Virtual device and choose Settings
Navigate to System and click the Processor tab
Tick the check-box, Enable PAE/NX
Click OK and you are done
To verify, start the Virtual device from Oracle VM VirtualBox. If all has gone well, the device boots up.
Close this device and open it from Genymotion.
For latest Windows 10 (HP & Intel motherboard/processor),
Follow the below steps, starting with :
Settings ->
Update & Security ->
Recovery ->
Advanced startUp -> Restart now
F10 (System Recovery) -> System Configuration tab -> Virtualization Technology
Enable
F10 to save and exit
For Ubuntu on HP (Intel processors),
Press F10 on booting the system, it will enter into system setup mode.
You will find tabs on top like Main, Security, Advanced.
Go into Advanced >> and click on System settings.
Mark the check boxes on Enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Back to Main, click on save changes and exit.
enable PAE/NX in virtualbox network config
My BIOS VT-X was on, but I had to turn PAE/NX off to get the VM to run.
You need to enable virtualization using BIOS setup.
step 1. Restart your PC and when your PC booting up then press your BIOS setup key (F1 or F2 or google it your BIOS setup key).
step 2. Go to the security menu.
step 3. Select virtualization and enable it.
Note:- BIOS setup depends on PC Manufacturer-brand.
If you're on 32-bit machine don't allow more than 3584 MB of RAM and it will run.
I had to turn PAE/NX off and then back to on...voila !!
Make sure Virtualization is enabled in your bios.
Simply check how many CPUs you are allocating. With one CPU you do not need to play with your bios.
Open your BIOS and enable virtualization.

Virtualization not enabled error in docker even though it is enabled

I try to install docker toolbox on Windows 10 Home 64 bit. I've got an AMD cpu.
Windows 10 home edition doesn't have Hyper-V feature, so it cannot be enabled, but just to be sure, I tried to disable it (windows wasn't able to recognize this feature).
I also enabled virtualization in BIOS, I restarted my machine multiple times, I can see in system properties that virtualization is enabled.
I even reinstalled docker toolbox (I'm using version 18.09.3).
I have installed latest VirtualBox (5.2.28r)
And I still get an error
Running pre-create checks...
Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory"
Looks like something went wrong in step ´Checking if machine default exists´... Press any key to continue...
enter code here
Are you able to tell me what I'm doing wrong or what else I could try ?

Enabling virtualization in Windows 10

I am trying to install Docker. It is installed succesfully however when i run it, it asks for enabling hardware virtualization in bios. When i go into bios, i do not find any such option to enable it. Can anyone help me. Best

How to unable AMD-V on Oracle VM VirtualBox Manager

I set up a virtual machine (Linux - Ubuntu) on "Oracle VM VirtualBox Manager" (Application). I can't start it because:
"AMD-V is disabled in the BIOS (or by the host OS) (VERR_SVM_DISABLED)" (Error Msg upon attempt to start)
My desktop use Windows 10 and has Virtualization option supported and enabled, I also disabled Hyper-V as instructed here:
"How to disable Hyper-V in command line?" (link), and closed my desktop after applying the change.
I still have "Oracle_VM_VirtualBox_Manager/Settings/System/Acceleration" (path to option box) grayed out, which stop me from enabling AMD-V.
I'm clearly missing something to access this option and yet I have visualization enabled and Hyper-V disabled. Any leads would be appreciated.
Fixed it, having virtualization enabled and hyper-V disabled isn't enough apparently.
Asus BIOS wasn't something I'm used to, but if you go in the BIOS:
advance setting/CPU
and you enable svm Mode, you should get access to a 64-bytes version of your virtual machine in the settings of the application you are using. From there, my virtual machine managed to start up without issues.
hope this help anyone...
Your Virtualization is disabled so you need to enable it
**go to BIOS**
->Restart your system and click Fn+f2
next
**go to configuration**
click SVM and enable it (if you have AMD processor)
or
Click intel virtual Technology and enable it (if you have intel processor)

enabling vt-x on win8.1 without using BIOS

I need to run VM on my acer laptop, with win8.1 that supports VT-x but it's disabled.
I contacted acer support and they said your BIOS doesn't allow you to change it, or something like that.
it was enabled and I was able to run VM, then it suddenly diabled.
I want to enable it using cmd, or any other way rather than using bios, because this junk acer laptop doesn't allow me to change it from the bios.
thanks in advance....
I found an answer and it worked for me, by disabling the hyper-V.
here is the command:
bcdedit /set hypervisorlaunchtype off
and to enable it:
bcdedit /set hypervisorlaunchtype auto
and you need to restart your computer to apply the changes.
You can find the source answer and other possible solutions here:
https://superuser.com/questions/540055/convenient-way-to-enable-disable-hyper-v-in-windows-8

Resources