WSL: WSL update crashed Windows error after reboot Class not registered Error code: Wsl/0x80040154

Version

Microsoft Windows [Version 10.0.22621.674]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

Unable to fetch due to class not registered error.

Distro Version

Unable to fetch due to class not registered error.

Other Software

image

Docker Desktop 4.13.0

Repro Steps

I ran wsl.exe --update today and it caused Windows 11 to crash/reboot. No blue screen, just reboot. Now when I try to run any WSL item (docker desktop, Ubuntu shell, wsl.exe) I get the following error.

C:\Users\Phil>wsl
Class not registered
Error code: Wsl/0x80040154

I see Windows Subsystem for Linux Preview in Windows Store “Modified minutes ago”. However, trying to open from the store also give the same error code.

Class not registered
Error code: Wsl/0x80040154
Press any key to continue...

Expected Behavior

Expected the wsl.exe --update to install correctly.

Actual Behavior

WSL is broken. I suspect the old WSL was uninstalled and the installer crashed before the new install completed.

Diagnostic Logs

  • confirmed “Windows Subsystem for Linux” is still turned on in Windows Features
  • WSL is configured for 64 GB of RAM which is half of the installed RAM of 128GB.
  • WSL is configured for 8 CPU which is half of my Threadripper 16 Core, 32 Thread CPU
  • WSL has been installed and working fine for a year and half

WSL logs attached

WslLogs-2022-10-24_10-16-10.zip

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 24 (1 by maintainers)

Most upvoted comments

Getting the same error since running wsl --update and was bluescreened. Repair button doesn’t help whatever on WSL or distro app.

Found the trick.

  1. Uninstall Windows Subsystem for Linux Preview app from Microsoft Store [settings (win+i) > app]
  2. Run wsl command in cmd (run as administrator)

@pbolduc

@mshumsky Thank you. I will delay this fix for one day to give the WSL team a chance to request additional diagnostic information from my system. However, tomorrow, I will need Docker and WSL working.

Getting the same error since running wsl --update and was bluescreened. Repair button doesn’t help whatever on WSL or distro app.