Docker stopped working on windows 10 after installing android emulator - windows

My problem is that docker worked in my windows 10 up until yesterday after I re installed android studio to my computer. It keps on telling me that:
Hardware assisted virtualization and data execution protection must be
enabled in the BIOS. See
https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization
And I don't seem to have hyper-v in my " Turn Windows features on or off " but in task manager it seems to be there. I followed the instruction on the link but it still doesn't work. I have tried to uninstall both docker and android studio. I'm at loss here nothing I have tried so far have changed anything.

Docker requires both hardware virtualization (configured in BIOS) and Hyper-V (configured in Windows) enabled on your machine.
You can check if hardware virtualization is enabled with the PowerShell command (gcim Win32_ComputerSystem).HypervisorPresent If false, you must enable hardware virtualization in your BIOS.
After verifying your BIOS settings, you can check if Hyper-V is enabled by running (Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online).State To enable Hyper-V, run Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
from an administrator PowerShell session.
If both features are enabled, there is likely an issue with your Docker installation. I would suggest completely removing Docker and subsequently reinstalling per Microsoft's recommendations.

What worked for me was to type the following command into cmd or PowerShell:
bcdedit /set hypervisorlaunchtype auto
Other possible solutions are described here: Docker for Windows error: "Hardware assisted virtualization and data execution protection must be enabled in the BIOS"

Related

vmware workstation 15 player: Device/Credential Guard not compatible issue even disable it

My host is running Windows 10 enterprise. I got the vmware workstation 15 player issue: Device/Credential Guard not compatible issue when launching a VM.
I googled and and I followed the instructions https://learn.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage on disabling the device/credential guard, but still not working. I also tried https://www.youtube.com/watch?v=CGpv2Dvzyeg and it's the same issue. I read the stackoverflow posts related to this issue like VMware Workstation and Device/Credential Guard are not compatible but still does not help.
Any ideas why? I have no idea what to do next. Please help!!
On my windows 10 1903 may 2019 update system with vmware player 15.1.0 [ or workstation ] installed i'll get this error from time to time when attempting to start vmplayer.exe [ or vmware.exe ].
The reason is not because of a device/credential guard compatibility issue that was resolved in earlier vmware player and workstation releases. The reason is because i've forgotten to reboot system with the hyperv-v hypervisor disabled at boot.
As was noted in comments to your question by #magicandre1981 one solution is to uninstall the hyper-v feature and reboot. An alternative, especially if you need hyper-v at other times for vm or docker containers or phone emulator purpose,s is to just temporarily disable its hypervisor component.
This is accomplished using commands that have been been mentioned in other SO threads on this subject that must be run from a "Run as administrator" command prompt or powershell command line window.
hyper-v hypervisor disable = bcdedit /set hypervisorlaunchtype off
hyper-v hypervisor enable = bcdedit /set hypervisorlaunchtype auto
check if hyper-v hypervisor is enabled at boot = bcdedit /enum
The last command will show hypervisorlaunchtype Auto when its enabled at boot and hypervisorlaunchtype Off when its disabled which is the state you need to use vmware player [ or workstation ].
If you are someone who maintains an open customized "Run as administrator" command prompt or powershell command line window at all the time you can optionally setup the following aliases / macros to simplify executing the above commands.
doskey hpvEnb = choice /c:yn /cs /d n /t 30 /m "Are you running from elevated command prompt" ^& if not errorlevel 2 ( bcdedit /set hypervisorlaunchtype auto ^& echo.^&echo now reboot to enable hyper-v hypervisor )
doskey hpvDis = choice /c:yn /cs /d n /t 30 /m "Are you running from elevated command prompt" ^& if not errorlevel 2 ( bcdedit /set hypervisorlaunchtype off ^& echo.^&echo now reboot to disable hyper-v hypervisor )
doskey bcdL = bcdedit /enum ^& echo.^&echo now see boot configuration data store {current} boot loader settings
With the above in place you just type "hpvenb" [ hypervisor enabled at boot ], "hpvdis" [ hypervisor disabled at boot ] and "bcdl" [ boot configuration devices list ] commands to execute the on, off, list commands.
I had the same problem to run virtual mac. i did this two step.
1_ turned off windows features "Hyper-v" and "virtual machine platform" and "windows hypervisor platform" and restarted windows.
2_ installed last version Mac OS X Unlocker for VMware.
As in here, simply run this in cmd as administrator and then reboot
bcdedit /set hypervisorlaunchtype off
I had the same problem. I had VMware Workstation 15.5.4 and Windwos 10 version 1909 and installed Docker Desktop.
This is because Hyper-V is incompatible with VMware until 2020.
Here how I solved it:
Install new VMware Workstation 16.1.0
Update my Windwos 10 from 1909 to 20H2
As VMware Guide said in this link:
If your Host has Windows 10 20H1 build 19041.264 or newer,
upgrade/update to Workstation 15.5.6 or above. If your Host has
Windows 10 1909 or earlier, disable Hyper-V on the host to resolve
this issue.
Now VMware and Hyper-V can be at the same time and have both Docker and VMware at my Windows.

VMWare Workstation cannot run on Windows 10 after recent update to Windows 10

I've Windows 10 Pro system, and use Hyper-V on that system. Due to the needs of device redirection doesn't works well with Hyper-V, I've installed VMWare Workstation 14.
I have to disable Hyper-V to make VMWare Workstation work, at beginning. It worked until last weekend , seems because of the QFE update. I just verified, it was not QFE but Feature update to Windows 10, version 1803 that triggered the problem with VMWare Workstation again.
After Windows update completed (after reboot), I tried to start a VM in VMWare. I get the error dialog complaining about Device/Credential Guard.
Following the instruction in this link: https://kb.vmware.com/s/article/2146361, and after the reboot, I get another complaint about incompatibility with Hyper-V.
After reset the Hyper-V selection in Windows Feature or confirm that HyperV is not already removed, and reboot, the first error came back.
It gets in a loop of error complaining about Device Guard and complaining about Hyper-V for VMWare.
Ok, thanks to the answer from communities of VMWare: https://communities.vmware.com/thread/588526
The issue is now gone, by applying the following change:
Disable credential guard by using readiness tool from Microsoft: https://www.microsoft.com/en-us/download/details.aspx?id=53337, with this command: DG_Readiness_Tool_v3.2.ps1 -disable
Disable Hyper-V by using PowerShell command: Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Reboot and accept to boot without CG/DG.
Although I don't like that VMWare cannot work together with device guard from system, I get my VM working for the moment.
1- run cmd as admin
2- run : bcdedit /set hypervisorlaunchtype off
3- reboot
let me knew if it works please
good luck
here are the few steps for you to solve this issue:
Disable the HvHost service (and any other services with prefix Hyper-V if needed) from windows TaskManager(Ctrl+Alt+Del)
use the tool from the official website
Uncompress the downloaded zip file to your own directory, take C:\DG_Readiness_Tool_v3.5 here for instance.
Run Windows PowerShell as admin, type the following two commands:
cd C:\DG_Readiness_Tool_v3.5
.\DG_Readiness_Tool_v3.5.ps1 -Disable
Reboot
Adrian at https://answers.microsoft.com/en-us/windows/forum/windows_10-security/cannot-disable-memory-integrity-core-isolation-in/29ac5ce4-30d2-47d1-ab17-734980fd287b
says "I think it's a bug that this cannot be disabled via UI but fortunately it's possible through the registry by setting the following key to 0:"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity\Enabled
This worked for me as well [Windows 10 Pro Version 1803(OS Build 17134.112, VMWare Workstation 14 Pro Version 14.1.2]

Enabling Hyper-V on Windows 10 not working

When I run Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V-All I get Error Code: 0x800f0831
I know online it says it is typically a .NET error, but I have double checked that .NET is installed properly.
I've tried the scan now commands and I've tried enabling it in safe mode and through Powershell with no luck.
Why can't I enable Hyper-V on this laptop?

Docker for windows not working after install

Steps:
Installed Docker for windows here (stable)
Attempted to run: An error occurred, Hardware assisted virtualization and data execution protection must be enabled in the BIOS.
Went here the read
Made sure I have 64bit windows 10 pro and hyper-v turned on.
Made sure virtualization is enabled
Run Docker again: same error.
What am I doing wrong?
Here are some resources that might help:
https://forums.docker.com/t/bootcamp-running-windows-hardware-assisted-virtualization-and-data-execution-protection-must-be-enabled-in-the-bios/23519/2
https://forums.docker.com/t/mobylinuxvm-failed-to-start/15175

Cannot start docker after installation on Windows

I am a new to Docker. After the installation of Docker Toolbox (OS: Windows 10) I run Docker Quickstart Terminal and in the console I see this:
Running pre-create checks...
Error wirh pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. It it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Look like something went wrong in step 'Checking if machine default exists'...
Press any key to continue...
What did I do wrong? All checking of system and install steps are taken from here.
Thank you very much for your help!
Hyper-V and VirtualBox are conflicting each other.
You can either uninstall Hyper-V or run
docker-machine create -d virtualbox --virtualbox-no-vtx-check test
Source
Docker supports Hyper-V as the driver
You need to perform the following steps:
Create a virtual switch, refer to this article on how to do that
Create a docker machine using that network switch and hyper-V driver.
docker-machine create -d hyperv --hyperv-virtual-switch "name of the virtual switch created above" default
I got the same error when I installed Docker Toolbox on my Windows 10 machine.
Solution:
Install Docker Community Edition (not Docker Toolbox)
Enable Hyper-V
Open Control Panel -> System and Security -> Programs (left panel) -> Turn Windows features on or off -> Check the Hyper-V box
As of 2017's Win 10, if you don't have Hyper-V option, then your Windows OS is not Enterprise Edition. Also, Docker seems to work a lot better on Intel processors (not AMD).
Add C:\Program Files\Docker\Docker\resources\bin to Path in Environmental Variables.
Open Git Bash and type docker-compose up and now that command should work.
If you don't have GitBash, please download it.
I was having the same issue, and this blog post solved it. The author runs you through the steps of adding the --virtualbox-no-vtx-check flag to the docker shell script.
Virtualbox and Hyper-V don't play well together. I am NOT the author.
I set the Hyper-V off using windows feature on off and it worked for me.
See if when you run:
docker-machine create -d hyperv --hyperv-virtual-switch "Virtual Switch" default
you get Error with: pre-create check: "Hyper-V PowerShell Module is not available"
If so just enable in Docker(icon on your desktop)->settings->expose daemon on TCP ...
You need to disable Hypervisor to check new application that use VT-x before the virtual machine launch:
Open the command prompt as Administrator
Run bcdedit to check hypervisor status:
Check hypervisor launch type.
If is set to auto then disable it:
bcdedit /set hypervisorlaunchtype off
Reboot host machine and launch VirtualBox again
After performing above steps I opened again Docker Quickstart terminal and it is working fine.
I pressed the Windows Button on keyboard. Typed 'Hyper-V Manager'. It opened the 'Hyper-V Manager'. Then I right clicked on my machine name. There was an option to 'stop'. I selected this option. It stopped the 'Hyper-V' on my machine and then Kitematic worked fine, i.e., it download the hello-world-nginx and displayed the web page.
NOTE: This is strange and I am not sure why. Once I have done above steps, now when I restarted the Hyper-V using Hyper-V Manager, Kitematic is still working and downloading images. Can anybody comment why it is now still working when Hyper-V is also running ? Thank you.
Good
Ali Ahsan
The solution as suggested by #Gene is correct and works perfectly if:
One has windows pro edition
Both Hyper-V Management Tools and Hyper-V Platform are enabled
Sometime this isn't always the case; here is what to do:
Check Windows Edition:
To check which version right click on Windows key and select System.
Scroll down to Windows specifications and look at [Edition]
Check Hyper-V Platform (virtualisation)
For Hyper-V Platform to be enabled one must turn on virtualisation; normally this is done via the BIOS.
On HP laptop one this is done from the BIOS.
On start-up click Ctrl+F10
Press the right arrow key to System Configuration tab.
Select Virtualization Technology and then press the Enter key.
Select Enabled and press the Enter key.
Once these steps are done then:
Search for Turn Windows features on or off.
Scroll down to Hyper-V
Tick this box (Ensure you see a tick NOT a black box which indicates some features not enabled)
Upon restart docker should be running... good luck !!

Resources