42

After substituting Docker Desktop on Windows 10 with a more recent version, clicked to start it and got the following error

WSL 2 installation is incomplete

WSL 2 installation is incomplete

The WSL 2 Linux kernel is now installed using a separate MSI update package. Please click the link and follow the instructions to install the kernel update:

https://aka.ms/wsl2kernel

Press restart after installing the Linux kernel

By default, in Settings > General the option "Use the WSL 2 based engine" was already selected. This might be due to me already having Ubuntu 18.04 LTS locally.

If I go to Docker Desktop Settings > Resources > WSL INTEGRATION

Docker WSL Integration

You don't have any WSL 2 distro. Please convert a WSL 1 distro to WSL 2, or install a new distro and it will appear here.

How can I get Docker running?

Tiago Martins Peres
  • 1,327
  • 2
  • 17
  • 33

3 Answers3

39

There's two ways you can get it to work

  1. Using WSL 2 based engine.
  2. Without using WSL 2 based engine.

1 - Using WSL 2 based engine

In this page under "Download the Linux kernel update package".

Update Linux kernal package

and then Docker will start just fine

Docker running


2 - Without using WSL 2 based engine

If the goal is just to get Docker running, one can simply start by unchecking the box that says "Use the WSL 2 based engine". This can give the following error

Required Windows feature(s) not enabled: Hyper-V.

Required Windows feature(s) not enabled: Hyper-V.

Switch to WSL 2 based engine?

To enable Hyper-V: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v

So, in PowerShell 7 run the command

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Hyper-V in Windows 10

which requires to Restart the computer to complete the operation. Then, once starting Docker again, you can get the following error

Docker failed to initialize

Docker failed to initialize

One or more errors occurred.

Eventually, just by clicking to start again, Docker will start running

Docker running

docker version

Ramhound
  • 41,734
  • 35
  • 103
  • 130
Tiago Martins Peres
  • 1,327
  • 2
  • 17
  • 33
  • 2
    I had already installed WSL on my Windows 10 box. So, the 1st suggestion worked for me, after a restart post installation without any hassles. Thank you. – itsraghz Oct 24 '21 at 08:18
  • Excellent answer to the question but I will say, take a peek at Arun's answer as well, FIRST. This did resolve things for me quickly and easily. – Frank Thomas Jan 20 '23 at 14:34
4

I had the same error. I just had to update WSL by executing:

wsl --update
Toto
  • 17,001
  • 56
  • 30
  • 41
Arun Velu
  • 41
  • 1
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://superuser.com/help/whats-reputation) you will be able to [comment on any post](https://superuser.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/1149638) – DarkDiamond Oct 05 '22 at 14:55
  • This does easily answer the question asked. No explanation ,but it does resolve the outstanding issue. Only point I will add is perform a reboot after performing the wsl update command in powershell. – Frank Thomas Jan 20 '23 at 14:35
0

Follow guide at this link.

You need to enable the windows subsystem for linux with command:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

which enables WSL1.