microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.46k stars 822 forks source link

WslRegisterDistribution failed with error: 0x80070003 #6363

Open wxxiong6 opened 3 years ago

wxxiong6 commented 3 years ago

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80070003 Error: 0x80070003 ???????????

Press any key to continue...

sirredbeard commented 3 years ago

Please collect WSL logs and provide a link the feedback hub item.

benyaminl commented 3 years ago

https://github.com/microsoft/WSL/issues/6512#issuecomment-773173169

Please do https://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html and try to enable wsl again, it should work correctly. It mean there're some file missing. I seen this in many windows installation (clean windows), and the only way to fix it is either reset the windows or in-place upgrade. I choose In-place upgrade.

pdebuitlear commented 3 years ago

Saying "there's some file missing" isn't helpful. Not everyone in corporate settings can do an in-place upgrade.

benyaminl commented 3 years ago

Saying "there's some file missing" isn't helpful. Not everyone in corporate settings can do an in-place upgrade.

I agree with that, but til about 6 month looking into log, there're nothing that help, and my lab need to go on, so I just in-place upgrade each computer on my lab. It's troublesome. The mod on reddit also doesn't help at all and state there won't be any 0x80070003 if we put the wsl on C: drive. In-place ugrade is my last resort, at least it's working now, but https://github.com/microsoft/WSL/issues/5718 hasn't fixed yet till now.

therealkenc commented 3 years ago

Logs from #6512 here.

EduardoCabria commented 3 years ago

Saying "there's some file missing" isn't helpful. Not everyone in corporate settings can do an in-place upgrade.

Hi ! I have the same problem, when I try to install a Linux distribution on my Windows (because it is a WSL2 requirement, in order to run Docker Desktop on my local Windows10 laptop), I get this message: imagen

Have you found a solution other than the one proposed by @benyaminl ?

It happens to me like @pdebuitlear , I have a corporative settings and I can't do an in-place upgrade.

Thankyou!

pdebuitlear commented 3 years ago

Saying "there's some file missing" isn't helpful. Not everyone in corporate settings can do an in-place upgrade.

Hi ! I have the same problem, when I try to install a Linux distribution on my Windows (because it is a WSL2 requirement, in order to run Docker Desktop on my local Windows10 laptop), I get this message: imagen

Have you found a solution other than the one proposed by @benyaminl ?

It happens to me like @pdebuitlear , I have a corporative settings and I can't do an in-place upgrade.

Thankyou!

The fix for me was to set the following registry key value to 1: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive

lokinmodar commented 3 years ago

My system:

Edition Windows 10 Pro
Version Dev
Installed on    ‎5/‎21/‎2021
OS build    21382.1
Experience  Windows 10 Feature Experience Pack 321.12100.0.3

Fresh installed system and it produced the op error. Did the inplace upgrade by iso and no success. Even docker is giving me errors:

System.InvalidOperationException:
Failed to deploy distro docker-desktop to %LOCALAPPDATA%\Docker\wsl\distro: exit code: -1
 stdout: The system cannot find the path specified.

Funny thing is: before I format the PC due to another issue everything was working flawlessly (I was already using this Dev Channel Build)

benyaminl commented 3 years ago

Does the folder exist? Because if that folder doesn't exist than it will raise such error.

lokinmodar commented 3 years ago

Does the folder exist? Because if that folder doesn't exist than it will raise such error.

Yes it does but i managed to finally solve the issue by deleting the file %USERPROFILE%\.wslconfig, restarting wsl and retrying the distro install. It is worth to check for this before doing any in-place upgrade...

ksugiarto commented 3 years ago

Does the folder exist? Because if that folder doesn't exist than it will raise such error.

Yes it does but i managed to finally solve the issue by deleting the file %USERPROFILE%\.wslconfig, restarting wsl and retrying the distro install. It is worth to check for this before doing any in-place upgrade...

Thanks a lot, this is finally the one that able to solve mine as well.

I tried to do this repair-install

#6512 (comment)

Please do https://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html and try to enable wsl again, it should work correctly. It mean there're some file missing. I seen this in many windows installation (clean windows), and the only way to fix it is either reset the windows or in-place upgrade. I choose In-place upgrade.

Didn't work for me.

rbalmeida commented 3 years ago

I was having issues reinstalling, just deleted the wslconfig file as suggested by @lokinmodar and it resolved my issue as well. Thanks for sharing.

walfredocarneiro commented 3 years ago

Does the folder exist? Because if that folder doesn't exist than it will raise such error.

Yes it does but i managed to finally solve the issue by deleting the file %USERPROFILE%\.wslconfig, restarting wsl and retrying the distro install. It is worth to check for this before doing any in-place upgrade...

Thanks a lot, this is finally the one that able to solve mine as well.

I tried to do this repair-install

#6512 (comment) Please do https://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html and try to enable wsl again, it should work correctly. It mean there're some file missing. I seen this in many windows installation (clean windows), and the only way to fix it is either reset the windows or in-place upgrade. I choose In-place upgrade.

Didn't work for me.

====> This work for me.

ioweb-gr commented 2 years ago

For my case there's no .wslconfig file. The error persists on fresh install of windows 11.

huang-tianwen commented 2 years ago

For my case there's no .wslconfig file. The error persists on fresh install of windows 11.

any luck in fixing this? I regretted so much to upgrade my windows..

robinduerhager commented 2 years ago

None of the provided workarounds helped me. I also don't have a .wslconfig. I still get the following error:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070003
Error: 0x80070003 Das System kann den angegebenen Pfad nicht finden.

Press any key to continue...

Really enjoyed working with WSL so i hope this can get fixed 😞.

huang-tianwen commented 2 years ago

None of the provided workarounds helped me. I also don't have a .wslconfig. I still get the following error:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070003
Error: 0x80070003 Das System kann den angegebenen Pfad nicht finden.

Press any key to continue...

Really enjoyed working with WSL so i hope this can get fixed 😞.

Back up data and reinstall win 11, I also reset it and it works. But all applications need to re-install.

robinduerhager commented 2 years ago

None of the provided workarounds helped me. I also don't have a .wslconfig. I still get the following error:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070003
Error: 0x80070003 Das System kann den angegebenen Pfad nicht finden.

Press any key to continue...

Really enjoyed working with WSL so i hope this can get fixed 😞.

Back up data and reinstall win 11, I also reset it and it works. But all applications need to re-install.

I'm on Windows 10. Idk why, but WSL just suddenly stopped working. I really don't want to reinstall windows all over again... I'd rather use a Linux Machine on Hyper-V, haha. I feel like there must be another wokraround or fix.

VAllens commented 2 years ago

Any progress? I am using windows 11

miron commented 2 years ago

Does the folder exist? Because if that folder doesn't exist than it will raise such error.

Yes it does but i managed to finally solve the issue by deleting the file %USERPROFILE%\.wslconfig, restarting wsl and retrying the distro install. It is worth to check for this before doing any in-place upgrade...

Forgot about this lurking around when I compiled a custom kernel :)

VincentSastra commented 2 years ago

I came across this same issue on Windows 10 Home. I have enabled virtualization on my BIOS and enabled both Virtual Machine Platform and Windows Hypervisor Platform Windows Features. I have tried re-installing these features multiple times but I couldn't make it work.

I was finally able to fix the issue by doing a a Windows In-Place Upgrade. More specifically I followed the direction in this tutorial: repair-install-windows-10-place-upgrade to do the upgrade with the ISO file.

Hope this can help someone :)

Shadow-Cipher commented 1 year ago

Saying "there's some file missing" isn't helpful. Not everyone in corporate settings can do an in-place upgrade.

Hi ! I have the same problem, when I try to install a Linux distribution on my Windows (because it is a WSL2 requirement, in order to run Docker Desktop on my local Windows10 laptop), I get this message: imagen Have you found a solution other than the one proposed by @benyaminl ? It happens to me like @pdebuitlear , I have a corporative settings and I can't do an in-place upgrade. Thankyou!

The fix for me was to set the following registry key value to 1: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive

THANK YOU!!!! This fixed my WSL issue, awesome!

rudolphos commented 1 year ago

@pdebuitlear

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive

Didn't work:

image Ubuntu was installed from Microsoft Store: image

Windows 10, 19045.2364; Windows Feature Experience Pack 120.2212.4190.0

@lokinmodar

Yes it does but i managed to finally solve the issue by deleting the file %USERPROFILE%\.wslconfig, restarting wsl and retrying the distro install. It is worth to check for this before doing any in-place upgrade...

No such folder existed on my system..

EDIT: I fixed it. I uninstalled Ubuntu, deleted all remained files (additionally used powershell to uninstall related apps) and uninstalled WSL2 Kernel released in 2021 April (digital signature). Then I installed this same kernel and downloaded Ubuntu from Store. Now it successfully installed. image image

mozhuanzuojing commented 1 year ago

Resolved WslRegisterDistribution failed with error: 0x80070003

  1. Open regedit
  2. Find 计算机\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
  3. 删除Lxss下空的注册表项,例如:{24022fa9-20a9-4e2a-9cde-9c1bfe4e6700}
  4. wsl-regedit
mohdwaseem commented 1 year ago

Try this simple solution, it works with me https://stackoverflow.com/a/67639264/1849480

LouieMartin commented 1 year ago

I have not coded for like a month because of this issue, any progress?

Cyterg commented 1 year ago

Disabling core isolation (VBS) and then reenabling and reinstalling WSL fixed the problem for me.

ptomato commented 1 year ago

I managed to fix the problem by going to "Turn Windows featuers on or off" in Settings, unchecking "Virtual Machine Platform" and "Windows Subsystem for Linux", rebooting, and then reinstalling WSL.

yuanqingye commented 1 year ago

Does the folder exist? Because if that folder doesn't exist than it will raise such error.

Yes it does but i managed to finally solve the issue by deleting the file %USERPROFILE%\.wslconfig, restarting wsl and retrying the distro install. It is worth to check for this before doing any in-place upgrade...

works for me!!

robinduerhager commented 1 year ago

I just tried this solution but with Ubuntu-18.04.6 and Ubuntu-22.04.6 and it finally worked for me :)

https://github.com/microsoft/WSL/issues/3054#issuecomment-1783150815

ScofieldaCreep commented 9 months ago

Resolved WslRegisterDistribution failed with error: 0x80070003

  1. Open regedit
  2. Find 计算机\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
  3. 删除Lxss下空的注册表项,例如:{24022fa9-20a9-4e2a-9cde-9c1bfe4e6700}
  4. wsl-regedit

This works for situations like you mishandle the regits qaq

EllieShan commented 2 months ago

Resolved WslRegisterDistribution failed with error: 0x80070003

  1. Open regedit
  2. Find 计算机\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
  3. 删除Lxss下空的注册表项,例如:{24022fa9-20a9-4e2a-9cde-9c1bfe4e6700}
  4. wsl-regedit

it works for me after delete items under Lxss, thanks.

Jacquwes commented 4 weeks ago

Hello, I'm having the same error since installing Atlas OS on my computer. I have enabled the optional features, virtualization is enabled in BIOS, there is no .wslconfig file, there is no Lxss entry in my registry. I cannot do an in-place system upgrade. Any other solutions?