Fix Docker Desktop – Unexpected WSL error in Windows 11

Simple solutions to Fix Docker Desktop Unexpected WSL error in Windows 11.

Docker Desktop is an application that allows developers to build, share, and run containerized applications on their system. Sometimes, this app throws a message saying “Docker Desktop – Unexpected WSL Error” in Windows 11. Fortunately, there are possible solutions to fix this issue.

First, let’s see why Docker Desktop – Unexpected WSL Error occurs. This common problem triggers the error message when trying to start this application and the computer is not connected to domain/active directory. Docker relies on Windows Subsystem for Linux, specifically WSL2, therefore, when there is an issue with this, the error message appears.

Docker Desktop Unexpected WSL Error

Docker Desktop Unexpected WSL Error

Here is how to fix Docker Desktop – Unexpected WSL error in Windows 11:

Enable Virtualization from BIOS

I have read users’ feedback, and some of them fixed this issue by enabling Virtualization from BIOS. The Process of enabling Virtualization from BIOS depends on your computer so head to the steps mentioned:

  1. Restart your computer.
  2. On Company Logo screen, press the Key F2, F10, Esc, or Delete depending on manufacturer to enter BIOS Setup.
  3. Navigate the Section, “Virtualization”, “VT-x”, “SVM”, “AMD-V” or similar term using arrow keys or mouse cursor.
  4. Enable the Virtualization.
  5. Press F10 or Esc and click Save or a similar option.

See: Fix Docker Desktop Starting forever error in Windows 11 or 10.

The Docker Desktop needs WSL 2 to function properly which is built with Virtualization Technology so if it’s disabled, then you may face errors.

Turn Two Windows Features on

To run Docker application perfectly, “Windows Hypervisor Platform” and “Virtual Machine Platform” must be installed. These options will help to fix the Unexpected WSL Error.

  1. Press Windows Key+R and type appwiz.cpl.
  2. Click Turn Windows features on or off from the left panel.
  3. Check box “Windows Hypervisor Platform” and “Virtual Machine Platform”.
  4. Click “OK”.
how to fix Docker Desktop - Unexpected WSL error in Windows 11
  1. Wait for Searching and installing. Click “Restart now”.

Docker Desktop recommends WSL2 which runs when Hypervisor Platform and Virtual Machine platform provide a virtualization environment.

Install WSL Manually

If WSL2 is not installing through Windows Features then Microsoft provides a direct download link so there is nothing to worry about. Download the WSL2 Linux kernel update package for x64 machine straight from the official source and manually install using this.

  1. Visit this Link and click on “WSL2 Linux kernel update package for x64 machine”.
  2. Open the Downloaded wsl_update_x64.msi file.
  3. Choose Next and click Yes in User Account Control.
  4. After installation, click Finish.

Install WSL from CMD

Apart from the previous method, WSL2 can be installed using Command Prompt. Simply, a cmd command line will perform the whole task for this hence, go with the steps:

  1. Click the Start, type CMD, and Right-click on it.
  2. Choose Run as administrator and click Yes
  3. Paste the command: wsl --install and press “Enter”.
wsl --install on command prompt
  1. Wait for Installation.
  2. After then, restart your Computer.

Update Windows Subsystem for Linux

WSL receives updates on regular basis and the old version of this feature might cause Docker to cause Docker desktop unexpected WSL error. Therefore, install the update using Microsoft Store, Command Prompt, or Windows PowerShell whenever available.

  1. Press the Windows button and type cmd.
  2. Select – Run as administrator.
  3. Enter the following command: wsl --update and hit Enter.
fix Docker Desktop - Unexpected WSL error
  1. Click Yes and allow the Update to complete.
  2. Reboot your PC.

Disable Legacy Console in CMD

Legacy Console is provided to deal with compatibility problems in Windows but this has reverse effect on the latest version. Check if this option is enabled in Command Prompt and disable if it is.

  1. Launch elevated Command prompt following the steps mentioned in the previous method.
  2. Right-click the Title Bar and select Properties.
  3. Uncheck “Use legacy console (requires relaunch, affects all console)”.
  4. Click OK and reopen Command Prompt.
Use legacy console (requires relaunch, affects all console)
  1. Then, try to install or update the WSL2.

Use Powershell cmdlet

Besides using Command Prompt and download link WSL2 can be installed through Windows PowerShell. In case, the Docker Desktop is still showing the error on opening then try installing Windows SubSystem for Linux with this method:

  1. Type Powershell. in the Search box and select “Run as administrator”. Click Yes.
  2. Write the following cmdlet (without quotes) and Press the Enter key:
"dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart"
Docker Desktop - Unexpected WSL error in Windows 11
  1. Let the installation complete and launch Docker once again.

Contact the Docker Desktop Team

You can contact the Docker Desktop team related to your issue:

Docker Support:

You can directly send your message to the Docker Desktop team. Visit this link, and enter your Name, Email, Topic, Subject, and Message. Hit Submit. Your message will be sent to the Docker Desktop team.

Docker Forums:

Docker has a Forum where you can ask questions and review answers. This is very helpful to get the answer to your query from other users.

Docker Slack Community:

Fortunately, Docker has a Slack Community where the Developers share knowledge and information.

Methods:
Enable Virtualization from BIOS
Turn Two Windows Features on
Install WSL Manually
Install WSL from CMD
Update Windows Subsystem for Linux
Disable Legacy Console in CMD
Use Powershell cmdlet
Contact the Docker Desktop Team

That’s all!!

Sharing is caring    Share Whatsapp

 
Topics:  Windows
  
About Sunita
Love to play with Windows 11 and 10. Suggestion - Going for Registry change or system files edit then remember to take a backup or create a restore point before Starting.