wsl --import-in-place fails with 0x80070002 (ERROR_FILE_NOT_FOUND) when Docker Desktop starts with WSL 2
Windows Version
Windows 11 Pro 10.0.26300.9818
WSL Version
3.0.3.0
Are you using WSL 1, WSL 2, or WSLC?
- [x] WSL 2
- [ ] WSL 1
- [ ] WSLC
Kernel Version
6.18.54.1-1
Distro Version
docker-desktop (created by Docker Desktop; not present after reinstall)
Other Software
ocker Desktop (latest version from docker.com, per-user install, WSL 2 backend). Docker had previously been installed and uninstalled on this machine.
Repro Steps
Install WSL with wsl --update (WSL 3.0.3.0). Uninstall Docker Desktop, then reinstall it from docker.com, keeping “Per-user installation” and “WSL 2” selected. Start Docker Desktop. Docker fails with the error below. The wsl -l -v output lists only an unrelated distro (podman-uosserver), and the docker-desktop distro is missing.
Expected Behavior
Docker Desktop imports its docker-desktop distribution and starts the WSL 2 engine.
Actual Behavior
running wslexec: ... c:\windows\system32\wsl.exe --import-in-place docker-desktop
Diagnostic Logs
No response
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The script will output the path of the log file once done.
If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues
Once completed please upload the output files to this GitHub issue.
See Collect WSL logs (recommended method).
If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.
Hi @CavalierMax .
Please check if the previous version is < 2.7.14. If so, check if C:\Program Files\WSL\system.vhd exists. If it does not, you are hitting the update issue fixed in 2.7.14 and 3.0.1. Please download the 3.0.3 installer from https://github.com/microsoft/WSL/releases/download/3.0.3/wsl.3.0.3.0.x64.msi. Right click the installer -> more options -> repair to repair the installation.
This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.
Thank you!