I'm getting the below error after installing a new version of Docker Desktop.
An unexpected error was encountered while executing a WSL command.
Common causes include access rights issues, which occur after waking the computer or not being connected to your domain/active directory.
Please try shutting WSL down (wsl --shutdown) and/or rebooting your computer. If not sufficient, WSL may need to be reinstalled fully. As a last resort, try to uninstall/reinstall Docker Desktop. If the issue persists please collect diagnostics and submit an issue (https://docs.docker.com/desktop/troubleshoot/overview/#diagnose-from-the-terminal).
I am installing Docker Desktop in Azure Virtual Machine.
Any lead would be helpful. Thanks in advance.
I got the same error and solved it by installing a Ubuntu Distribution. You need to install Ubuntu Distribution and set it as default Distribution of Windows Subsystem.
Here are some steps that worked for me.(Execute commands on Powershell)
I don't know if following steps solve your problem but at least it would give insight to you about problem.
Check installed distros and try to install it again.
wsl --status
wsl -l #list wsl
wsl –install or wsl.exe --install -d ubuntu
If you encounter with error when you are installing
Downgrade wsl version to 1 install distro and then upgrade to version 2.
wsl --set-default-version 1
wsl –install or wsl.exe --install -d ubuntu
wsl --set-default-version 2
wsl.exe --set-version ubuntu 2
Make sure that hypervisorlaunchtype auto by launching following command.
bcdedit /set hypervisorlaunchtype auto
Also make sure that all necessary(I know hyper v is not must for wsl2,nevertheless I enabled it.)
dism.exe /online /enable-feature /featurename:Microsoft-Hyper-V-All /featurename:VirtualMachinePlatform /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With