-
Notifications
You must be signed in to change notification settings - Fork 855
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
Installing Any Distro on WSL2 Fails with "WslRegisterDistribution failed with error: 0x80070002" #5107
Comments
Update: WSL 1 works fine; this error is WSL 2 specific.
|
Realized this is extremely similar to what happened with #4959, including the initial errors after upgrading. |
Hi, Just saw the report on the launchpad. That bug on launchpad is more related to an external drive installation issue. It could be related, and I will look into it. On the same time, can you try to do the following to see if that works?
|
Thanks @patrick330602, I've done this and unfortunately it still happens. Seems like a recurrent issue across some WSL2 installs but this and #4959 haven't received any dev support yet. I appreciate you checking in on this. |
Not to bump but.... also having this issue. Windows 10.0.19041.264 |
Adding more data here, I had this issue as well and following @patrick330602's steps seemed to work from me. |
Thanks for the pings, and sorry I didn't get a change to take a look earlier. I took a look at the traces that @spaceraccoon filed and we're failing to create our virtual network. If possible, could somebody who is still running into this issue collect a trace via feedback hub? Our category is "Developer Platform > Windows Subsystem for Linux". That trace will include networking logs so we can dig into why creating the network is failing. |
Thanks @benhillis, I’d like to add that I fixed this after uninstalling Checkpoint VPN and Docker. I’m not sure what was the cause of this, but I strongly suspect it was due to Checkpoint due to the way it modifies existing routing tables on Windows which can cause the virtual network issues. Additionally, after fixing it I faced issues where internet would fail after connecting to the Checkpoint VPN again. You can see my fix in the related issue #4246, but basically I switched over from Checkpoint’s standard client to the Checkpoint Capsule client from the windows store, which handles routing table changes differently (probably in a saner way than setting priority to 1 for all checkpoint routes). All in all I think the change in WSL2’s network stack is clashing with VPNs; perhaps there’s a way to solve this from WSL2. |
I wonder if there are any further developments on this? I have this problem now. I've uninstalled Docker, and 3rd party VPNs, but to no avail. I did have WSL2 running fine, but it stopped working after I installed VMware Workstation Player. I've since uninstalled the latter, all the Linux distributions, WSL, Virtual Machine Platform, etc, and reinstalled WSL/Virtual Machine Platform, new Ubuntu distribution, but have that same error. Installing into WSL1 still works fine. |
I encountered same problem today after rebooting my computer after a long time and noticed I didn't have Ethernet for WSL on my network settings, after removing WSL feature from Windows and rebooting system and re adding it back to system fixed my problem, noticed Ethernet for WSL is back in my adapters. I'm certain it's related with Ethernet for WSL is missing. |
Same here, on AMD Brazos PC
The logs are attached. Then set default back to v1 and the debian installed successfully. |
Could you please check if Ethernet for WSL is in present on your network connections? I'm strongly believing issue related with it. |
@mcipekci you're right on the problem! As you wrote, after removing WSL and reinstall, "Ethernet adapter vEthernet (WSL)" is added and then install of v.2 distros seems to work. Thanks! However, networking in V.2 distros does not work - but this is another problem. (DNS resolution fails in Ubuntu 18 but ping to numeric address works, in Debian even ping to numeric address fails) |
patrick330602's solution worked for me. I was able to keep all my files and configuration. |
I've been having this issue while trying to use WSL2 as well. It was working fine for me (minus KVM execution when trying to use qemu), but I enabled Trusted Execution in my bios by accident and that bricked it. Tried everything under the sun with no success. @pavel-a if you're still having issues with DNS in Ubuntu, add wsl.conf in /etc/ and add
then edit your resolv.conf with your chosen DNS server |
@jamestalbot3 Thanks, already noticed relation to the resolv.conf #5336 |
I tried disabling and enabling the WSL2 feature several times now, to no avail. I removed my VirtualBox and Docker installations after the first try to do so, hoping the issue would go away, which it didn't. It's probably related to the fact that there is no network adapter named |
Same problem here! I also think that it is related to the absence of Iv'e also tried to "manually" install the adapter via Hyper-V with no luck. 😥 |
same here. This issue occurred out of blue. Possibly due to some docker update. IS there any plan to fix this issue soon? |
So for me this was due to the following group policy setting being set to Disabled. Setting it to Enabled resolved. The setting is:
|
Thanks for the suggestion! Happy to hear that it works for you, unfortunately my PC already had the setting enabled. |
If I look at Adapter Settings during install of ubuntu 2004, the WSL device is created and removed. |
I followed the instructions (wpr -start wsl.wprp) at the bottom of this page ... The file that was not found is my custom kernel file that I used in previous installations (and also on another computer / Windows installation, but possibly restored by Microsoft account ...) - the bzImage I specified this path in a .wslconfig file. [wsl2] Hopefully this will help someone. |
Following the suggestion to record a log file for the feedback hub as per the last comment (https://github.com/Microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs), I tried to My build number is 19042.928, I'm not on Fast Ring. |
I uninstalled Debian from my start menu and got an error when reinstalling it from the MS Store. I tried reinstalling multiple times. But, after clearing folders and file (s) which included the word 'Debian' from Hope this works for someone. |
Same,I can not open wsl2 after uninstall Microsoft Office,then I tried to reinstall wsl2, then same problem occured. |
It did! I've been bashing my head against this problem for weeks and you're the first person to suggest that! My kernel was set to a file in my TEMP folder of all places. No clue how that happened, but commenting out that line allowed me to register Ubuntu again. Thank you for the solution. |
Commenting out all lines except "[wsl2]" in my C:\Users\vincent_chu\.wslconfig solve this problem. Now there is no 0x80070002 error and WSL2 works fine. Hopefully this will help. |
I just deleted the |
@jphilli22 method with the .wslconfig file helped me !! it instantly worked!! |
Dear you all, I had a similaire issue. See The trick was to start the Linux distribution installation (in my case, Ubuntu 20.04) using the microsoft store. Very quickly you have to edit the "vEthernet (WSL)" ETH adapter via your windows control pannel. There were a red cross on the adapter. And then I dissabled all particular pluggins / filters (that I got from Camera / Vision sensors libraries, in my case TeliGev Driver and UEYE driver). After applying the changes, a green check appeared on the adapter and the Linux installation could end correctly. Maybe this can help you. |
I have a same problem,and thanks for the @max-a, I remember i used to create a .wslconfig file in my user folder, when i delet it, wsl2 works again. |
So, I had been having this issue since upgrading to Windows 11. I tried a Windows Reset (soft reinstall), tried uninstalling and reinstalling WSL (with a reboot). Turns out it was an issue with my .wslconfig file (in C:\Users[user]\AppData\Local\Temp). It had a path to a non-existent swapfile and a non-existent custom kernel. I just commented out both of those lines and everything seems to be moving along. For whatever it may be worth, I also do not have the vEthernet adapter installed but network passthrough seems to be working fine for me, at least in kali. |
Thank you! After 3 hours I finally made it work. Apparently there was this line "kernel=C:\temp\myCustomKernel" in my .wslconfig file and that was causing the problem. I deleted it and now wsl sees my actual kernel. |
I can not found ".wslconfig" in directory, why? |
You can refer to this link, https://docs.microsoft.com/zh-cn/windows/wsl/wsl-config |
|
Same here. Deleting .wslconfig doesn't resolve the problem, when we don't even have that file.
|
I also faced this problem several times, what worked for me was first setting wsl to version 1 and then installing ubuntu |
after that once ubuntu is installed as version 1, to convert it to version 2: if it might five error that .wslconfig file not found or extension=none; follow these steps: Open File Explorer. Navigate to C:\Users\Usman. Right-click on wslconfig.txt and select Rename. Make sure the file is now named .wslconfig without any extension. Open PowerShell as Administrator. Run the command to shut down WSL: bash bash |
can you please collect networking logs using instructions at https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues? this will generate a zip with name starting with "WslNetworkingLogs" thanks |
Your Windows build number: Microsoft Windows [Version 10.0.19041.207]
What you're doing and what's happening:
Error: 0x80070002 The system cannot find the file specified.
wslconfig /u Debian
then reinstall it. Launching Debian from Store leads to same errorWslRegisterDistribution failed with error: 0x80070002
.What I've tried:
LxssManager
(interestingly, I also have two other servicesLxssManagerUser_3c782
and MessagingService_3c782``.Output of
wslconfig /list /all
:However, in Microsoft Store, Debian is installed. When I click Launch, it leads to the same
WslRegisterDistribution failed with error: 0x80070002
.If I try to initialize any distro by clicking Launch from the store or starting the app, I get
It should just allow me to install a new distro.
Strace of the failing command, if applicable: (If
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).For WSL launch issues, please collect detailed logs.
lxcore_logs.zip - when trying to launch Debian
The text was updated successfully, but these errors were encountered: