Docker Desktop - Unexpected WSL error

C:\WINDOWS\system32>wsl -l -v
NAME STATE VERSION

  • Ubuntu Stopped 1

C:\WINDOWS\system32>wsl --set-default-version 2
For information on key differences with WSL 2 please visit Comparing WSL Versions | Microsoft Learn
The operation completed successfully.

C:\WINDOWS\system32>wsl -l -v
NAME STATE VERSION

  • Ubuntu Stopped 1

C:\WINDOWS\system32>wsl --set-version ubuntu 2
For information on key differences with WSL 2 please visit Comparing WSL Versions | Microsoft Learn
Conversion in progress, this may take a few minutes.
WSL2 is not supported with your current machine configuration.
Please enable the “Virtual Machine Platform” optional component and ensure virtualization is enabled in the BIOS.
Enable “Virtual Machine Platform” by running: wsl.exe --install --no-distribution
For information please visit Troubleshooting Windows Subsystem for Linux | Microsoft Learn
Error code: Wsl/Service/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED

C:\WINDOWS\system32>wsl.exe --install --no-distribution
The operation completed successfully.

C:\WINDOWS\system32>wsl -l -v
NAME STATE VERSION

  • Ubuntu Stopped 1

Docker Desktop requires WSL 2 to work properly. Check which version of WSL you have by running wsl -l -v
If you have both WSL 1 and WSL 2 installed, make sure WSL 2 is set as the default version by running wsl --set-default-version 2.

1 Like

I run these commands but at the end no change

Why did you edit your first post to something completely different? It makes my answer seem unrelated.

Sorry for confusion. It is not different. I tried to paste in the commands and the outputs to see. It is the same. Unfortunately the display might not be clear. I tried to follow your recommendation

It is different. First you ask about Docker Desktop now you are talking about Ubuntu. The two are un-related.

I mentioned that the Desktop Docker is not working due to WSL which is installed on Windows 10 PC. The WSL is Ubuntu.

Docker Desktop has nothing to do with your Ubuntu install:

>wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
docker-desktop-data
docker-desktop

As you can see I have two additional distributions, one for docker-desktop and one for the data.

I am not clear. Is your problem with Docker Desktop or Ubuntu?

Docker Deskop does not on WIndows 10 PC and the message is due the WSL installed on Windows 10. It says either to restart the PC or uninstall and re install WSL. Desktop Doker requires WSL to run. WSL is based on Ubuntu,. Windows Subsystem for Linux (WSL) is a feature of Windows that allows you to run a Linux environment on your Windows machine, I don’t know how to attach here a screenshot for you.

C:\WINDOWS\system32>wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu (Default)

You have not installed Docker Desktop using WSL2. Remove Docker Desktop and when installing it again make sure the WSL2 checkbox is selected.

it was installed with WSL2 checkbox selected

If is has been installed with WSL2 enabled then it would show as listed like my wsl --list from earlier. Uninstall Docker Desktop and install it again with WSL2 enabled.

You can check it is set in settings: