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

Error code: Wsl/Service/CreateInstance/0x80040326 when starting WSL Distro #9867

Closed
1 of 2 tasks
sleavitt opened this issue Mar 30, 2023 · 39 comments
Closed
1 of 2 tasks

Comments

@sleavitt
Copy link

sleavitt commented Mar 30, 2023

Windows Version

Microsoft Windows [Version 10.0.19045.2788]

WSL Version

1.1.3.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Open Windows Terminal, open a new tab for a Linux Distro.
--OR--
Open Command Prompt or PowerShell, type "ubuntu" and hit enter.
--OR--
Open VSCode, Click Terminal -> New Terminal, and select a Linux (WSL) distro.

Expected Behavior

Distro should open normally.

Actual Behavior

Error: 0x80040326
Error code: Wsl/Service/CreateInstance/0x80040326
Press any key to continue...

Diagnostic Logs

No response

@sleavitt
Copy link
Author

The timing of this in relation to when #9866 was opened seems suspicious, as I'm not a huge believer in coincidence. However, the error code on my issue is different (though the error number is the same), and WSL does not open in VSCode, so I'm opening this as a separate issue.

@sleavitt
Copy link
Author

Appears to be related to #9866 in that issuing "wsl --update" from a PowerShell prompt updated WSL which seemed to fix it.

WSL version: 1.1.6.0
Kernel version: 5.15.90.1

However, I'd love to know what broke it in the first place, as I hadn't manually updated WSL recently. Closing issue as fixed.

@tbwdxd
Copy link

tbwdxd commented Mar 30, 2023

Appears to be related to #9866 in that issuing "wsl --update" from a PowerShell prompt updated WSL which seemed to fix it.

Same issue and use "wsl --upate" fixed it.

@HeriYantodotDev
Copy link

same issue here: wsl-update fixes the issue. Thanks sleavitt

@lminor
Copy link

lminor commented Mar 30, 2023

Same! I was in several terminal sessions working and they were all closed with WSL error. Rebooted machine which didn't fix and found this post! wsl --update worked but what the heck broke it in real time?

@yexingok
Copy link

Same issue here with Chinese Win11 22H2, run
wsl --update
Fixed the issue, thanks sleavitt

@easrng
Copy link

easrng commented Mar 30, 2023

I had the same issue on Windows 10, wsl --update fixed it for me too.

@m-shahbaz-kharal
Copy link

same issue, did wsl --update didn't work, but after sometime I got windows notification about successful update and then it started working again.

@ystxn
Copy link

ystxn commented Mar 30, 2023

same issue as the rest above and fix. why would wsl just break by itself without an update? this is raising reliability questions on what should now be a stable platform.

@adamshawvipps
Copy link

adamshawvipps commented Mar 30, 2023

had the exact same issue when starting windows 11 an hour ago. Resolution wsl --update

@bitis
Copy link

bitis commented Mar 30, 2023

same issue here: wsl-update and wsl --shutdown fixes the issue.

@nilyang
Copy link

nilyang commented Mar 30, 2023

Appears to be related to #9866 in that issuing "wsl --update" from a PowerShell prompt updated WSL which seemed to fix it.

WSL version: 1.1.6.0 Kernel version: 5.15.90.1

However, I'd love to know what broke it in the first place, as I hadn't manually updated WSL recently. Closing issue as fixed.

I can’t thank you sleavitt enough.
When I install visutal studio 2022 and just reboot the system a few minutes ago ,then encountered the problem.
Just use the comand wsl --update in Powershell, and every things are back to normal.

@SaurabhKoverhoop
Copy link

Thank you. That must have been one of the quickest problem-->solution sprints I had :)

@Robert-Ernst
Copy link

Same issue here. The timing is indeed suspicious.
The command is wsl --update not wsl-update
I don't like when my things self-destruct.

@tbraun-hk
Copy link

tbraun-hk commented Mar 30, 2023

Same issue here, but I on wsl --update I get a "severe error" message. Not very helpful...

PS C:\WINDOWS\system32> wsl --update
Installation: Windows-Subsystem für Linux
Schwerwiegender Fehler

However, uninstalling "Oracle VirtualBox" (I should never have installed it in the first place, I know...), deactivating the windows feature "Windows Subsystem for Linux" and re-activating it again solved the issue for me.

@pfrajsifx
Copy link

Same issue here, but I on wsl --update I get a "severe error" message. Not very helpful...

PS C:\WINDOWS\system32> wsl --update
Installation: Windows-Subsystem für Linux
Schwerwiegender Fehler

However, uninstalling "Oracle VirtualBox" (I should never have installed it in the first place, I know...), deactivating the windows feature "Windows Subsystem for Linux" and re-activating it again solved the issue for me.

@tbraun-hk
Use

wsl --shutdown
wsl --update

@hkjels
Copy link

hkjels commented Mar 30, 2023

Windows 10
Had to run

wsl --shutdown
wsl --update

Unfortunately, I found this ticket after having tried just about everything else, so my windows terminal settings are reset etc. Bummer

@strzyzewski
Copy link

After being stuck on a Chat GPT4 dialog on how to check the health of my WSL2 I'm so glad to have found this thread. Everything described above worked also for me.

wsl --shutdown
wsl --update

I feedbacked this thread to GPT-4, maybe it will learn from it.

@Y-Torches
Copy link

I used the command "wsl --update", but it didn't return right result and it was always stay in "Checking for update...". How should i do?

@strzyzewski
Copy link

I used the command "wsl --update", but it didn't return right result and it was always stay in "Checking for update...". How should i do?

Are you able to monitor the network traffic to check if any firewall rules are blocking the update request? For example turning off the Windows firewall might help.

@0anton
Copy link

0anton commented Mar 30, 2023

wsl.exe --update has fixed the above mentioned error for me too.

@GwenTheWelshGal
Copy link

GwenTheWelshGal commented Mar 30, 2023

It fixed it for me too for my WSL distros on Windows 11.

@Y-Torches
Copy link

I used the command "wsl --update", but it didn't return right result and it was always stay in "Checking for update...". How should i do?

Are you able to monitor the network traffic to check if any firewall rules are blocking the update request? For example turning off the Windows firewall might help.

Thank you, but i find a new solution. Inputting the command "netsh winsock reset" in terminal and restart the computer which can resolve the issue.

@the-moog
Copy link

To diverge from the conventional answers wsl --update seen above. I can say it was not so for me :(
Yes it did some sort of update (no idea what, no feedback or output) so I ran it again and then I got:

PS C:\WINDOWS\system32> wsl --update
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
Error code: Wsl/0x80070422
PS C:\WINDOWS\system32>

And on running wsl it just hung for minutes.

The good news is after 3-4 attempts, it eventually started (unusually verbosely) without having to reboot - for once windows did not need a reboot!!

@TonTonTWMAN
Copy link

wsl.exe --update !! fixed !! Thank you !

@hebangwen
Copy link

same issue here: wsl-update and wsl --shutdown fixes the issue.

Amazing, it worked. Thanks !!

@alexk-ede
Copy link

W11, 21H2 here
wsl --update didn't fix it (but updated) to newer version
wsl --shutdown did help and now it works again

@eilgug
Copy link

eilgug commented Mar 31, 2023

someone after this problem has also issue with docker desktop? it doesn't start anymore, without any type of error, just stuck on starting

@daliendev
Copy link

same issue here, after a wsl --update it works

@mwoodpatrick
Copy link

Fixed it for me on one laptop, on another laptop I had hit the error WSL broken with "Class not registered " Wsl/0x80040154 after installing update Stack Package - (Version 1023.322.4012.0).

@flwst
Copy link

flwst commented Mar 31, 2023

confirming wsl --shutdown followed by wsl --update in PowerShell is a fix, also solved my docker issues @eilgug

@hawi19952
Copy link

For me, I just turned the firewall on and the problem was fixed, try it this might help you

@doem97
Copy link

doem97 commented Apr 1, 2023

Just a temporary problem seems. A forced update? Anyway no-harm-to-try. wsl --update worked.

@LWShowTime
Copy link

same issue as the rest above and fix. why would wsl just break by itself without an update? this is raising reliability questions on what should now be a stable platform.

Did your windows get updated?

@fr3nch13
Copy link

I've tried the wsl --shutdown and wsl --update, and it's still giving the error.
Any other ideas as to why this is all of the sudden happening?

> wsl --update
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.
> wsl --shutdown
> ubuntu
Error: 0x80040326
Error code: Wsl/Service/CreateInstance/0x80040326
Press any key to continue...

Versions:

> wsl -v
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2965

@lopotras
Copy link

Same issue. wsl --update followed by wsl --shutdown worked.

@pmerlin
Copy link

pmerlin commented Jun 27, 2023

I've tried the wsl --shutdown and wsl --update, and it's still giving the error. Any other ideas as to why this is all of the sudden happening?

> wsl --update
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.
> wsl --shutdown
> ubuntu
Error: 0x80040326
Error code: Wsl/Service/CreateInstance/0x80040326
Press any key to continue...

Versions:

> wsl -v
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2965

you can always try to reinstall an old version like Microsoft.WSL_1.1.3.0_x64_ARM64.msixbundle
I 'm using an old version of docker and it looks like new version are not working well.
I had again same issue with same version number than you and reinstalling old version works.

@Sieboldianus
Copy link

wsl --update --web-download

Fixed it for me. I run on Windows Education, the Microsoft Store is disabled here for privacy, security and bloatware protection.

@nimra98
Copy link

nimra98 commented Feb 8, 2024

Thanks @Sieboldianus, worked for me as well.

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