Skip to main content

Troubleshooting "BackendDestroyException" in Docker


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.TaskQueuing.TaskQueue.<>c__DisplayClass18_0.<.ctor>b__1(


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

Popular posts from this blog

Solving PyCharm bug: "Python helpers are not copied yet..."

I have been using PyCharm Professional to run and debug Python code from my Windows machine to a remote Linux device. There are some other tools available for the same purpose (e.g. Python Tool for Visual Studio 2017). But in my opinion, PyCharm Professional stands out among its counterparts as it comes with a "All Batteries Included" setup. Once you configure remote Python interpreter in PyCharm, then it works out of the box. However, today after upgrading to PyCharm Professional 2018.2.1, I could not run my Python script on remote device. The execution always failed with below error - "Error running 'hello': Python helpers are not copied yet to the remote host. Please wait until remote interpreter initialization finishes." To solve this issue, I had to remove the ".pycharm_helpers " folder from the remove device and then restart PyCharm so that the folder is re-created and files are copied again. Here are the steps with comma

Customized Crosshair with OxyPlot charting library

I am using Oxyplot to draw heatmap for a WPF project and needed to draw a crosshair that moves according to user clicks. Since I couldn't find any good example or documentation on the topic, I made a small hack by using LineAnnotations and by over-riding Oxyplot mouse click event. Here is the sample code using WPF with MVVM pattern- MainWindow.xaml <Grid>         <oxy:Plot x:Name="CrossHairPlot">             <oxy:Plot.Axes>                 <oxy:LinearAxis Key="MyXAxis" Position="Bottom" IsZoomEnabled="False"/>                 <oxy:LinearAxis Key="MyYAxis" Position="Left" IsZoomEnabled="False"/>                 <oxy:LinearColorAxis Key="ZAxis" Position="Top" LowColor="Black"                                                                                      HighColor="White" PaletteSize="300">                     <G

Solving ‘Could not resolve host: github.com’ issue

Recently I ran into this issue while trying to clone one of my own repository from GitHub C:\GitHub\FS> git clone https://github.com/<username>/FS.git Cloning into 'FS'... fatal: unable to access 'https://github.com/<username>/FS.git/': Could not resolve host: github.com At first I thought that this could be due to some proxy setting. So I tried to unset it by executing below command - C:\GitHub\FS> git config --global --unset https.proxy But that didn’t fix the problem and I was still getting the same error. As it turned out later, the culprit was my VPN connection. Turning off the VPN fixed the issue. For the records, I was using ‘Surfshark’ on my Windows 10 laptop.