WSL icon indicating copy to clipboard operation
WSL copied to clipboard

wsl service cannot start after `wsl.exe. --update`

Open rshurts opened this issue 3 years ago • 5 comments

Version

Microsoft Windows [Version 10.0.22621.1265]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

Ran wsl.exe --update

Running wsl returns: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. Error code: Wsl/0x80070422

Expected Behavior

wsl service is started and wsl commands work.

Actual Behavior

Running wsl returns: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. Error code: Wsl/0x80070422

Checking on the wsl service it is disabled and I'm unable to start it. Screenshot 2023-03-01 115550

Diagnostic Logs

No response

rshurts avatar Mar 01 '23 17:03 rshurts

To try to get back into a working state, I used Windows Optional Features to uncheck Virtual Machine Platform and Window Subsystem for Linux. Rebooted. Rechecked those two options. Rebooted. But even a clean install results in the same error when running the wsl command.

rshurts avatar Mar 01 '23 18:03 rshurts

@rshurts - something has disabled the service. Do you have any idea what might have done that? There may be some clues in your event log.

You could try to uninstall / reinstall the "Windows Subsystem for Linux" application (not the optional component), and see if that fixes it.

benhillis avatar Mar 01 '23 22:03 benhillis

I needed to get back up an running so I ended up doing a clean install of windows and wsl is working.

rshurts avatar Mar 02 '23 12:03 rshurts

You could try to uninstall / reinstall the "Windows Subsystem for Linux" application (not the optional component), and see if that fixes it.

I clicked Repair and that fixed it.

claui avatar Mar 30 '23 13:03 claui

Running from the command prompt as administrator solved the problem

sc config LxssManager start=auto

fernandozoomp avatar Jan 15 '25 10:01 fernandozoomp