Setting up Docker in Windows environment is not an easy task. I have seen many people (including me) struggling to get it run on Windows PC.
I have installed 'Docker for Desktop' in my laptop which has Windows 10 Pro 64-bit, Version 1909 (OS Build 18363.720). It was running fine with Windows containers. However, when I needed to switch to Linux container, it crashed with below error:
Docker.Core.Backend. BackendDestroyException:
Unable
to stop Hyper-V VM: Service 'Hyper-V Host Compute Service (vmcompute)'
cannot be started due to the following error: Cannot start service
vmcompute on computer '.'.
at Enable- MobyLinuxRequiredService, <No file>: line 103
at <ScriptBlock>, <No file>: line 804
at Docker.Core.Pipe. NamedPipeClient.<TrySendAsync> d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime. ExceptionServices. ExceptionDispatchInfo.Throw()
at Docker.Core.Pipe. NamedPipeClient.Send(String action, Object[] parameters)
at Docker.Actions.<>c__ DisplayClass39_0.< SwitchDaemon>b__0()
at Docker.ApiServices.Re-installing Docker or restarting Windows didn't help. After trying many online suggestions, finally I managed to fix this issue by following these steps:
1, Open "Window Security"
2, Open "App & Browser control"
3, Click "Exploit protection settings" at the bottom
4, Switch to "Program settings" tab
5, Locate "C:\WINDOWS\System32\ vmcompute.exe" in the list and expand it
6, Click "Edit"
7, Scroll down to "Code flow guard (CFG)" and uncheck
"Override system settings"
8, Start vmcompute from powershell "net start vmcompute"
After this, when I started Docker again, it worked like a charm!
Comments