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

The specified service does not exist as an installed service. Error code: Wsl/0x80070424 [process exited with code 4294967295 (0xffffffff)] #10779

Closed
1 of 2 tasks
omar2535 opened this issue Nov 17, 2023 · 19 comments

Comments

@omar2535
Copy link

Windows Version

Microsoft Windows [Version 10.0.22621.2715]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

WSL is now unable to launch following a Sindows update. Attempted to diagnose this issue by following the comments in #10755 (Disable hyper-v, enable virtual machine, reinstall WSL) but still doesn't work.

C:\Users\omart>wsl.exe

Expected Behavior

WSL to launch

Actual Behavior

Errored out with this:

The specified service does not exist as an installed service.
Error code: Wsl/0x80070424

Diagnostic Logs

No response

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

Closed similar issues:

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

@bousch
Copy link

bousch commented Nov 17, 2023

The latest windows updates completely broke my wsl. Disabling/re-enabling features did not help. Complete uninstall and reinstall of wsl and distributions does not help. At one point the wsl executable was working again but after wsl --update it was yet again broken and reports:
PS C:\WINDOWS\system32> wsl -l
The specified service does not exist as an installed service.
Error code: Wsl/0x80070424

@bousch
Copy link

bousch commented Nov 17, 2023

Now my wsl works again. What I did was:

  • copy the ext4.vhxd file from my distribution to reimport later.
  • Uninstall all Distros and WSL
  • disable Windows features:
    • Hyper-V
    • Virtual Machine Platform
    • Windows Hypervisor Platform
    • Windows Subsystem for Linux
  • Reboot
  • wsl --install
  • manually update wsl to 2.0.5 (because wsl --update breaks wsl for me)
  • wsl --import-in-place ext4.vhxd

I am not sure if all the steps were necessary or if the list above is incomplete. At one time I had wsl.exe working again but it complained that it needed a kernel update. Running wsl --update resulted in the original error (The specified service does not exist as an installed service. Error code: Wsl/0x80070424) and I had to start over again.
Now I have to find a way to block all Windows Updates because this took me 4 hours to get working again.

@bousch
Copy link

bousch commented Nov 17, 2023

Great stuff, not only did my office Windows Pro laptop had this issue, my personal Windows Home laptop has the exact same issue!

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 17, 2023

/logs

@bousch
Copy link

bousch commented Nov 17, 2023

Sadly what I did on Windows Pro does not seem work on Windows Home. Only as Administrator priviliges I can start wsl, otherwise I get this error:
PS C:\Users\bousch> wsl -l -v
Element not found.
Error code: Wsl/ERROR_NOT_FOUND

WslLogs-2023-11-17_23-54-29.zip

I will give up on trying to get wsl to work on my personal laptop. At least I got it to work on my work laptop where I need it for work. It has taken me all day and it is a waste of time.

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 17, 2023

@bousch: Based on the output it looks like WSL is in a bad state. Can you try uninstalling WSL, and then re-install it via the MSI package ?

@omar2535
Copy link
Author

@bousch How did you uninstall all your distros? I tried to do using the usual uninstall programs from settings but every time I restart the installation (wsl --install), the newly installed wsl still gives the same error

@bousch
Copy link

bousch commented Nov 18, 2023

@OneBlue Thanks, yes, I have uninstalled/rebooted/reinstalled many times. I will try again today as I was not in the best mood after trying all day yesterday :)
@omar2535 if you get the wsl executable to work and "wsl -l" still lists your distro's you can use "wsl --unregister distro-name" to uninstall them. But beware this will completely delete the distro (including your ext4.vhxd file) so if you still want to keep the data make sure to copy it somewhere so you can import it later. Note for me the wsl executable worked yesterday when I started powershell or cmd as Administrator.

@omar2535
Copy link
Author

Yea, I'm not able to get the executable working at all except for --help. I have copied the ext4.vhxd file so that's not a concern. I'll try to see if I can use the MSI package after my semi-uninstall

@bousch
Copy link

bousch commented Nov 18, 2023

I now have WSL working also on my Windows Home laptop. I did uninstall wsl and re-installed from MSI but this resulted in the same error as before. I did notice that there were two entries in "Apps & Features"; one of 459 MB which says 2.0.9.0 and a smaller one (8 KB or 8MB) without version but with advanced options. I deleted this one.
If I remember correctly the wsl command worked after this. I did run "wsl --update --inbox" and used "wsl --install -d Distroname" to reinstall the distro's I had before. Then I ran "wsl --shutdown" and replaced the .vhxd files in %localappdata% with my backups. Now wsl seems to run fine. The WSL entries in my "Apps & Features" list are:
image
image

@omar2535
Copy link
Author

Ok so I had the exact same thing (with two WSLs showing up), I removed the smaller one and ran the wsl --install -d Distroname command. But after that, running any wsl commands will fail except for help.

Interestingly, after I removed the smaller WSL entry from Apps & Features, anything I ran (such as wsl --update --inbox) would just prompt the help menu

image

@bousch
Copy link

bousch commented Nov 18, 2023 via email

@jbgomond
Copy link

Just updated my W10 PC and I now have the same problem. WSL shows version 2.0.9, it does not work in user mode but works only in administrator mode ...

C:\Users\XXX> wsl
Élément introuvable.
Error code: Wsl/ERROR_NOT_FOUND

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070490
Error: 0x80070490 ╔lÚment introuvable.
Press any key to continue...

@omar2535
Copy link
Author

omar2535 commented Nov 19, 2023

Ok. I finally fixed WSL. I haven't re-imported my files, but what I had to do was a complete re-installation of WSL. These were the steps I took:

  1. Go to features and turn off the following: Hyper-V, Windows Subsystem for Linux, and Virtual Machine Platform
  2. Go to Windows Add or remove programs and remove everything related to WSL (one of them was a very big WSL one that kept erroring when I tried to remove it, I ignored this)
  3. Further make sure WSL is uninstalled using the troubleshooter
  4. Reboot
  5. Re-enable features: Windows Subsystem for Linux and Virtual Machine Platform
  6. Reboot
  7. Open the command prompt as admin, run wsl -l and make sure it runs without the "service does not exist" error
    image
  8. Install WSL package directly from releases: 2.0.8
  9. Install WSL distro
    image

and now it works. I also tried using #10764 as previously mentioned, but I wasn't able to find that registry entry so skipped the steps. (Also note that I'm too afraid to update to 2.0.9 in-case anything bricks 😬) Additionally, I haven't imported my ext4.vhxd file yet, but will soon. Thanks @bousch :)

@omar2535
Copy link
Author

Closing as solved for now.

@pahar0
Copy link

pahar0 commented Nov 19, 2023

Launching WSL from a terminal with administrator privileges seems like a temporal workaround. Can somebody else confirm?
#10788 (comment)

@bousch
Copy link

bousch commented Nov 19, 2023

Ok. I finally fixed WSL. I haven't re-imported my files, but what I had to do was a complete re-installation of WSL. These were the steps I took:

  1. Go to features and turn off the following: Hyper-V, Windows Subsystem for Linux, and Virtual Machine Platform
  2. Go to Windows Add or remove programs and remove everything related to WSL (one of them was a very big WSL one that kept erroring when I tried to remove it, I ignored this)
  3. Further make sure WSL is uninstalled using the troubleshooter
  4. Reboot
  5. Re-enable features: Windows Subsystem for Linux and Virtual Machine Platform
  6. Reboot
  7. Open the command prompt as admin, run wsl -l and make sure it runs without the "service does not exist" error
    image
  8. Install WSL package directly from releases: 2.0.8
  9. Install WSL distro
    image

and now it works. I also tried using #10764 as previously mentioned, but I wasn't able to find that registry entry so skipped the steps. (Also note that I'm too afraid to update to 2.0.9 in-case anything bricks 😬) Additionally, I haven't imported my ext4.vhxd file yet, but will soon. Thanks @bousch :)

Nice! BTW afaik you do not have to import the ext4 file. You can just install the same distribution, do wsl --shutdown and overwrite the ext4 file in localappdata with your ext4 backup file.

@bousch
Copy link

bousch commented Nov 19, 2023

Launching WSL from a terminal with administrator privileges seems like a temporal workaround. Can somebody else confirm? #10788 (comment)

yes, in the end you should be able to run wsl as your regular user. Try to follow the steps Omar2535 described. Something similar worked for me on Windows 10 Pro. On Windows Home the same steps did not work for me, than maybe follow the steps I described above. I also did not mess with the windows registry.

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

5 participants