Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WslRegisterDistribution failed with error: 0x80070002 #12249

Open
1 of 2 tasks
wecha-ms-v2 opened this issue Nov 8, 2024 · 3 comments
Open
1 of 2 tasks

WslRegisterDistribution failed with error: 0x80070002 #12249

wecha-ms-v2 opened this issue Nov 8, 2024 · 3 comments

Comments

@wecha-ms-v2
Copy link

Windows Version

10.0.26100.2033

WSL Version

2.3.24.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 24.04

Other Software

No response

Repro Steps

C:\Users\wecha>wsl --install Ubuntu

Expected Behavior

expected Ubuntu to be installed.

Actual Behavior

C:\Users\wecha>wsl --install Ubuntu
Ubuntu is already installed.
Launching Ubuntu...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070002
Error: 0x80070002 The system cannot find the file specified.

Press any key to continue...
The operation completed successfully.

Diagnostic Logs

Could not run my existing Ubuntu distro, eventually resorted to reinstalling WSL from scratch in hopes it will resolve issue.

However still hitting same issue after uninstalling wsl and updating it.

C:\Users\wecha>wsl --update
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.

C:\Users\wecha>wsl --version
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2033

Attach are the logs when attempting to run cmd "wsl --install Ubuntu"
WslLogs-2024-11-08_14-50-11.zip

Copy link

github-actions bot commented Nov 8, 2024

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Detected appx version: 2.3.24.0

@sonwan2020
Copy link

Same failure for me.

I encounter this problem after I upgrade the OS system on 11/13.

WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2314

I tried these steps and it still not work:

  1. delete all my distributions environment from add or remove programs
  2. turn off features from Windows features
  3. restart
  4. turn on features

Still the command "wsl --list" shows error like
Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND

And the output of "wsl --install Ubuntu"

WslRegisterDistribution failed with error: 0x80070002
Error: 0x80070002 The system cannot find the file specified.

Press any key to continue...
The installation process for distribution 'Ubuntu' failed with exit code: 1.
Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED

@sonwan2020
Copy link

In my case, it turns out to be the problem related to plugin "Microsoft Defender for Endpoint plug-in for WSL"

  1. Run wsl --set-default-version 1
  2. Install Ubuntu wsl --install -d Ubuntu, the installation succeed but failed to start the system
     WSL1 is disabled by the computer policy.
     Please run 'wsl.exe --set-version Ubuntu 2' to upgrade to WSL2.
     Error code: Wsl/Service/CreateInstance/WSL_E_WSL1_DISABLED
    
  3. Run wsl --set-version Ubuntu 2,
    Conversion in progress, this may take a few minutes.
    A fatal error was returned by plugin 'DefenderforEndpointPlug-in'
    Error code: Wsl/Service/CreateVm/Plugin/ERROR_FILE_NOT_FOUND
    
  4. Check the details about the plugin C:\Program Files\Microsoft Defender for Endpoint plug-in for WSL\tools>healthcheck.exe
[2024-11-14 05:44:08 UTC]
Plugin Version          :
WSL Version             :
Defender App Version    :
Release Ring            :
VM Start Time (UTC)     : 2024-11-06 22:45:09 UTC
LKG Telemetry (UTC)     :
WSL Distro Running      : false

Active User SID         : S-1-12-1-816008863-1211069416-1275109537-96698126
Windows GUID            :
Windows Org ID          :
Windows Device ID       :
Licensed                : Valid

WSL GUID                :
WSL Device ID           :

And there is only one file the healthcheck.exe in the tools directory.
5. via 'Add or remove programs' I failed to repair the plugin, so I uninstall the plugin.
6. wsl --set-version Ubuntu 2 succeed, and wsl --list succeed. My WSL environment works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants