stackoverflow-docker-failed-to-start
stackoverflow-docker-failed-to-start
Asked 2 years, 4 months ago Modified 1 month ago Viewed 94k times
41
I have installed the Docker and then I have started the Docker. Docker says that "Docker is starting."
Then,Docker says "Docker Failed to Start". Please, Could you help me?
System.InvalidOperationException:
Failed to deploy distro docker‐desktop to C:\Users\‐‐‐\AppData\Local\Docker\wsl\distro: exit
code: ‐1
stdout: The operation could not be started because a required feature is not installed.
stderr:
at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String
prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\PR‐
15138\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 146
at Docker.Engines.WSL2.WSL2Provisioning.<DeployDistroAsync>d__17.MoveNext() in
C:\workspaces\PR‐
15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line
169
‐‐‐ End of stack trace from previous location where exception was thrown ‐‐‐
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() in C:\workspaces\PR‐
15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line
78
‐‐‐ End of stack trace from previous location where exception was thrown ‐‐‐
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__25.MoveNext() in C:\workspaces\PR‐
15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 99
‐‐‐ End of stack trace from previous location where exception was thrown ‐‐‐
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Docker.ApiServices.StateMachines.TaskExtensions.
Your privacy
<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\PR‐
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose
15138\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line
29 information in accordance with our Cookie Policy.
‐‐‐ End of stack trace from previous location where exception was thrown ‐‐‐
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Accept all cookies Necessary cookies only
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in
Customize settings
docker docker‐compose
ShareImprove this questionFollow edited Aug 10, 2021 at 11:39 asked Feb 7, 2021 at 18:42
Yavuz Yoldaş
821 1 9 19
1 Have you gone through the checklist? docs.docker.com/docker‐for‐windows/wsl – J. Scott Elblein Feb 7, 2021
at 19:26
13 Answers Sorted by: Highest score ﴾default﴿
62
In my scenario, I needed to install WSL 2 and my computer didn't have it. Installing it made docker run
successfully. Try the below steps if you are installing docker for the first time.
Control Panel ‐> Programs ‐> Turn Windows features Turn On or Off
Then Click ok
After that, you need to Enable WSL 1 and update it to WSL 2 ﴾https://learn.microsoft.com/en‐
us/windows/wsl/install‐win10#manual‐installation‐steps﴿
To Install WSL 1 which comes built‐in, open PowerShell as Administrator and run:
After that download the WSL 2 update from Microsoft. Use below this: WSL2 Linux kernel update
package for x64 machines
After installing the above package, you need to set WSL 2 as the default version.
wsl ‐‐set‐default‐version 2
Please note that to update to WSL 2, you must be running Windows 10.
For x64 systems: Version 1903 or higher, with Build 18362 or higher.
For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.
ShareImprove this answerFollow edited Sep 11, 2021 at 18:06 answered Aug 13, 2021 at 7:51
Shane Bishop Menuka Ishan
3,765 4 15 42 4,994 2 50 65
1 I got WSL 2 requires an update to its kernel component. and had to run wsl ‐‐update ﴾as
Administrator﴿ and then wsl ‐‐set‐version Ubuntu‐20.04 2 to upgrade my existing wsl ﴾took about 8 min﴿
– Vl4dimyr Sep 18, 2021 at 19:35
31
My Solution:
I have checked the Prerequisites for Docker. I have applied the second step in prerequisites. (Windows
Subsystem for Linux Installation with Manual Installation Steps) It has fixed the error for me.
WslRegisterDistribution failed with error: 0x80370114 Error: 0x80370114 The operation could not be
started because a required feature is not installed. ﴾I encountered this error.﴿ Please, apply this.
These steps are quoted from the "this" named hyperlink above.
1. Open "Windows 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"
9. Then go back and command wsl ‐‐set‐default‐version 2
ShareImprove this answerFollow edited Mar 15, 2022 at 12:17 answered Feb 8, 2021 at 15:18
Yavuz Yoldaş
821 1 9 19
3 While the link may provide a solution, it may become stale/broken/etc, so please, edit your post and add the
solution worked for you ﴾the link at the end﴿ as a part of an answer. Here's the reason: Your answer is in
another castle: when is an answer not an answer? – astentx Jul 9, 2021 at 23:56
1 Thanks, in my case, I had to install the WSL2 Linux kernel update package for x64 machines – Chris Gong Aug
18, 2021 at 15:40
11
Thanks, this is worked for me on 21H1﴾OS Build 19043.1288﴿ – Eren Peksen Nov 7, 2021 at 11:05
The problem is in WSL as it becomes unresponsive and returns a service error. Follow the below steps
By the way, I tried your advice but I take an same error. – Yavuz Yoldaş Feb 8, 2021 at 6:48
I was facing the same problem in my windows cooperate desktop. Unfortunately most of the windows
settings changes are not available for users and controlled by IT team. What I did to make docker
running is
The combination of the above answer and installation of new destro worked for me
3. Restart
4. Follow the accepted answer here https://answers.microsoft.com/en‐us/insider/forum/all/wsl‐2‐
installing‐linux‐failed‐error‐code/bae391d1‐4215‐4d93‐b0c4‐3d96404a7c74
5. Install a linux destro follow this https://learn.microsoft.com/en‐us/windows/wsl/install‐
win10#step‐4‐‐‐download‐the‐linux‐kernel‐update‐package
6. Launch Linux desktop as admin
My issues were...
Docker install worked but would not start successfully, I got "WSL not installed" message.
Tried the WSL installation instructions from https://learn.microsoft.com/en‐us/windows/wsl/install
Default WSL installation was not found from PS session. Would not run from the command line
without specifying the distro. Worked when I explicitly specified the default distro with the ‐d
argument
ShareImprove this answerFollow edited Sep 25, 2021 at 0:00 answered Sep 24, 2021 at 16:30
bad_coder ‐ on strike LaaRay
11k 20 42 71 1
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up
questions and answers that you found helpful. ‐ From Review – All Downhill From Here Sep 24, 2021 at 17:53
1 While this code may answer the question, providing additional context regarding how and/or why it solves
the problem would improve the answer's long‐term value. – Abhishek Dutt Nov 14, 2021 at 3:53
While this code may answer the question, providing additional context regarding how and/or why it solves
the problem would improve the answer's long‐term value. – Abhishek Dutt Nov 14, 2021 at 3:53
0
WSL2 cannot running.Reset winsock can fix it. Use following steps.
PS C:\WINDOWS\system32> wsl.exe
delete %appdata%\Docker*
delete %LOCALAPPDATA%\Docker*
Source
ShareImprove this answerFollow answered Dec 13, 2022 at 13:58
diman82
672 7 11
Also mention how to do , how it would look ! Please check stackoverflow.com/help/how‐to‐answer – Harsh
Apr 4 at 4:47
On Windows 11 with Docker Desktop v4.13.1 everything works fine with both Linux and Windows
containers. Than after a couple of restarts I suddenly get the same error ﴾Docker failed to start etc.﴿
Click on Troubleshoot in the header menu. Here you can Clean / Purge data, after that it works again.
WARNING: this solution will delete your Containers and Images. You can select what to delete after the
Clean / Purge data selection:
ShareImprove this answerFollow edited May 8 at 15:43 answered Dec 6, 2022 at 16:30
Cerveser
712 8 23
1 Good point: I've edited the answer => you delete the Containers and Images with this action. – Cerveser May
1 Good point: I've edited the answer => you delete the Containers and Images with this action. – Cerveser May
8 at 15:44
‐1