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

WSL2: error 0x80370109 while installing ubuntu on wsl2 #5194

Open
Xavier-Lam opened this issue May 10, 2020 · 46 comments
Open

WSL2: error 0x80370109 while installing ubuntu on wsl2 #5194

Xavier-Lam opened this issue May 10, 2020 · 46 comments
Labels

Comments

@Xavier-Lam
Copy link

Xavier-Lam commented May 10, 2020

  • Your Windows build number: 10.0.19041.208

  • What you're doing and what's happening: I installed ubuntu from microsoft store, when I first run, I got this error:

    Installing, this may take a few minutes...
    WslRegisterDistribution failed with error: 0x80370109
    Error: 0x80370109 ???????????????????
    
    Press any key to continue...
    

    image

    I'm using Surface Pro with Windows 10 Home Edition,The language on my system is simplified Chinese and the country in my system is People's Republic of China.

    I also installed docker desktop edge and it works perfect.

  • What's wrong / what should be happening instead:

    The error message should be correct displayed.

I couldn't see the detail error message, I don't know if this issue is duplicated to #4103

logs.zip

@Xavier-Lam Xavier-Lam changed the title WSL2: error 0xc03a001a while installing ubuntu on wsl2 WSL2: error 0x80370109 while installing ubuntu on wsl2 May 10, 2020
@smhaziq
Copy link

smhaziq commented May 26, 2020

In my case, reinstalling Hyper-V fix the issue

@Xavier-Lam
Copy link
Author

I'm using Windows 10 Home Edition,there is no Hyper-V....

@Biswa96
Copy link

Biswa96 commented May 26, 2020

@Xavier-Lam WSL2 do available in Windows 10 Home. See docs https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq

@Xavier-Lam
Copy link
Author

I already enabled WSL2 on my Windows 10 Home, and my docker runs on it well, this error occurred when I first ran Ubuntu, which downloaded on Microsoft Store.

@smhaziq
Copy link

smhaziq commented May 27, 2020

I'm on Windows 10 Pro though. Seems Hyper-V Services feature need to be enabled (for now):
MicrosoftDocs/WSL#445 (comment)

Sorry. Not sure what's the workaround for Windows 10 Home

@bagong
Copy link

bagong commented May 30, 2020

Not sure how to verify if it works completely, but I just installed Ubuntu 20.04 successfully "a la carte", i.e. no Hyper-V enabled, just Virtual Machine Platform and WSL of course. Converted it to WSL-2, no issues. I also read this "the latest release of WSL-2 will build on Hyper-V", but that seems not to be necessary (yet?). This is on Win 10 pro 2004, quite old i5 with the virtualisation option enabled in BIOS.

@alexvorobiev
Copy link

alexvorobiev commented Jun 12, 2020

Confirming that enabling Hyper-V got rid of the error. Then I got another error 0xc03a001a. That one got resolved by disabling compression as in #4103 (comment).

Update: that error only occurred on older (~10 y.o. i7) computer. I also installed wsl2 on another computer - brand new Lenovo Yoga and the install succeeded without enabling hyper-v.

@molexx
Copy link

molexx commented Jun 21, 2020

Same as OP here. Windows 10 Pro, Hyper-V enabled, Virtual Machine Platform enabled. Went through everything suggested in MicrosoftDocs/WSL#404 too.

Tried uninstalling by unticking Windows Subsystem for Linux, reboot, tick it again, reboot. Same error.

I have got it to work by opening Ubuntu_2004.2020.424.0_x64.appx with 7Zip, extracting install.tar.gz, and installing it using wsl --import from an adminstrator cmd.

The only slight issue is that the script that creates a user didn't run so when I run bash I am 'root'. I created a user in linux using useradd but I can't see how to make new bash sessions default to that user.

@easterism
Copy link

I wast times with this issue. Next I just run Ubuntu app under administrator. Who would have thought! It works!

@mattp0
Copy link

mattp0 commented Jul 7, 2020

I had the same experience, I tried enabling and disabling multiple times, fresh installs of WSL. I got it working finally by going into the services.msc and turning off and restarting the Hyper V compute service. This caused my docker desktop to crash and I restarted it once I had restarted the Hyper V compute service. I then ran the ubuntu 20.04 installer with WSL default version set to 2. IT FINALLY loaded and prompted me for a new Unix user. I am not entirely sure why this worked, something I found was the folder that holds the ubuntu defaulted to the compression attribute, I kept seeing the error op had mixed with a compression error the first time I tried to run after reboot. This is located in /Users/$User/Appdata/Local/Packages/CanonicalGroupLimited. Under properties and advanced attributes, unchecked the compression. Doing this alone did not solve it for me, I had to restart the Hyper V Compute Service. I hope that this may help someone. Was very frustrating... but yay WSL 2.

@CDAGaming
Copy link

Bumped, as issue is still present in the newer pipeline for Windows 11. Happy to report however that Cyber's workaround still works with rebooting the Hyper V service.

@ibanner56
Copy link

For others coming across this while previewing Sun Valley / Windows 11, I also had to run wsl --update before I could get unblocked here.

@mgrandi
Copy link

mgrandi commented Aug 2, 2021

can confirm that running wsl --update fixes it. Despite it saying "no updates available", running the ubuntu app (which registers ubuntu) works after that

@benhillis
Copy link
Member

We have identified the issue preventing WSL2 from launching. We are working on backporting the change to all impacted versions of Windows.

@maxboone
Copy link

maxboone commented Sep 17, 2021

Did a full reinstall through recovery, reinstalled WSL, still not working. Considering I can't switch to WSL1 I can't access my files at the moment.

For other people in the same boat that need their files quickly, you can convert the VHDX-image (probably in %LOCALAPPDATA%\Packages) to a VHD-image and open it up in VirtualBox (or QEMU / libvirt if you have a spare linux machine) using qemu-img.exe.

You can also mount the VHDX-image natively and mount it using pass-through.


Considering my issue was marked as duplicate (and it most probably is), I tried the solutions from here as well. Running wsl --update doesn't fix it for me.

Is there a fix that we can apply in the meantime before the patch rolls out?

@maxboone
Copy link

@benhillis Is there a temporary workaround for this issue / manual patch that we can apply. I currently can't use my WSL2 installs and need them badly. Where is the problem that causes this situated - in OS configuration or in the VMP source itself?

@Biswa96
Copy link

Biswa96 commented Sep 22, 2021

Try to install any GNU/Linux distribution with wsl.exe --import command in any user folders like Desktop, Documents etc.

@maxboone
Copy link

maxboone commented Sep 22, 2021

I see that the latest build contains fixes for specifically Hyper-V and WSL not running on ARM64. That fixed it, the Virtual Switch Extension Adapter is now created and I can start WSL2 containers again!


Tried that, only works on WSL version 1 - and (thus) not with the old image / VHDX-file. Running wsl --import on WSL2 results in the same time-out like error.

I do see VMMEM being spun up in Task Manager if I try running WSL2 commands so I presume that the underlying problem is missing configurations regarding Hyper-V Virtual Switches (or possibly the 9P service).

@mcflymarty
Copy link

I am exactly in the same situation. Surface Pro X.. Windows 11. Tried everything above.
I wonder if this has something to do with having originally Windows Home (default on SPX) and now on Pro!

@mcflymarty
Copy link

mcflymarty commented Oct 1, 2021

Incredible, just after giving up and writing the above comment, I noticed that wsl --status gave the error "The WSL 2 kernel is in the rollback state and is using a previous kernel version."

I deleted the following registry key, restarted WSL and finally managed to convert a WSL1 to WSL2 instance!

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\RollbackKernel

I'm on latest W11 - 22468.rs_prerelease

@RIscRIpt
Copy link

RIscRIpt commented Oct 7, 2021

Nothing of aforementioned helped to me.

Weirdly enough, I did run

wsl --shutdown <my_distro_name>

And then I could run that distro again!

@BattleWoLFz99
Copy link

Win 11 device(Surface Laptop Studio)
wsl --update
fixed the issue

@wogong
Copy link

wogong commented Oct 15, 2021

Nothing of aforementioned helped to me.

Weirdly enough, I did run

wsl --shutdown <my_distro_name>

And then I could run that distro again!

same here.
I encountered this problem after upgrading to Windows 11.

@Carolusdeeds
Copy link

This error appeared me when I tried to install Ubuntu from cmd console through the command wsl --install -d ubuntu (even with admin permissions). I solved that just executing ubuntu app directly with admin permissions.

P.S.: Before that note (anybody) must change the windows features (VM and WSL) first and enable Virtualization on your BIOS or UEFI.

This procedure was done with Windows 11 and works fine.

@rmegal
Copy link

rmegal commented Dec 20, 2021

Trying to install wsl on Windows 11 running in a VM. Have run the following to enable nesting VMs:

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

I ran wsl --install and I think it completed successfully.

I then run wsl -l -v, which tells me:

Windows Subsystem for Linux has no installed distributions.

So, I run wsl --install -d Ubuntu and get:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370109
Error: 0x80370109 The operation timed out because a response was not received from the virtual machine or container.

Press any key to continue...

What am I missing? Is this scenario also covered by the inbound fix?

wsl_0x80370109

@mforkel mforkel mentioned this issue Feb 6, 2022
2 tasks
@ns-vchen
Copy link

ns-vchen commented Oct 21, 2022

I had same issue here on Windows 10 VM when was running command in PowerShell and had the 0x80370109 issue over and over again

wsl --install -d Ubuntu

and I confirm the necessary components are installed correctly.

I finally switch to cmd.exe to run the install command and it works like magic :~~~

10/24 update:

after VM reboot, I failed to start WSL again...and found windows event logs has error on hyper-v-worker

Event ID 18560
'Virtual Machine' was reset because an unrecoverable error occurred on a virtual processor that caused a triple fault.
If the problem persists, contact Product Support. (Virtual machine ID 680B5FA4-D4F9-43EC-8425-6DE89D39CFC1)

圖片

@postronium
Copy link

A couple of weeks ago my WSL2 was Working, on Windows 11. After I deactivated it for a reason. And when I tried to reactivate it I got the x80370109 error. I tried everything written on this page, without success.
Microsoft Windows 11 Pro
10.0.22000 Build 22000

WSL Status:

Windows Subsystem for Linux was last updated on 22/10/2022
The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
For more information please visit https://aka.ms/wsl2kernel.

Kernel version: 5.10.102.1

@jonz-secops
Copy link

Win 11 device(Surface Laptop Studio) wsl --update fixed the issue

this as well as stopping running instances and installing via wsl --install <>

@HendricksK
Copy link

HendricksK commented Mar 6, 2023

yeah been trying to get WSL/WSL2 running for a week now, and keep ending up with the same issue.
was on windows 10, moved to windows 11.
made sure that SVM is turned on for my machine, running AMD.
I also uninstalled all Qemu tools, that I was using for proxmox, and all other virtualisation software, kind of lost here. And thinking about just going back to virtualbox.

@prism2001
Copy link

prism2001 commented Mar 15, 2023

i have no clue if this is gonna help anyone else, but just in case, i'll post what fixed it for me:

i was struggling with this issue for a long time and it was absolutely frustrating. none of the solutions online helped at all. just a few moments ago, however, i stumbled upon my old .wslconfig file that i had made 2 years ago and completely forgot about.

after opening it up in notepad, i immediately remember what i had done here: the last time i had WSL up and running, i felt that by default it was using too much ram for my taste, and i wanted the bare minimum to be able to run some minor things on it (which was AFTER the installation of a distro)

i had the RAM limit for WSL set to 256MB of RAM. which, unsurprisingly, was causing all subsequent attempts at distro installations to fail. upping that limit to 6144MB / 6GB immediately fixed the issue and I was able to finally install distros.

for reference, here is what my .wslconfig looks like now:

[wsl2]
memory=6144MB
processors=8

even if you don't already have this file in your user folder, maybe you could try creating this file (put it in C:\Users\YourProfile) and seeing if it makes any difference (of course adjusting these based on your actual system specs) but at minimum i would set it to whatever the official minimum RAM requirement is for the distro you're wanting to install

@azaf70
Copy link

azaf70 commented Mar 27, 2023

@prism2001 Thank you so much. I tried everything online but your answer was the only thing that helped. I just realized that I had created a .wslconfig file and had put memory=4 which caused wsl to produce the following error "The operation timed out because a response was not received from the virtual machine or container." As soon as I removed it; BOOM! Everything started working normally.

@spart0n654
Copy link

spart0n654 commented Apr 15, 2023

I am brand new to using linux and wanting to learn more about using it but I'm no stranger to tech, I've followed the instructions here that everyone has suggested and I'm still getting the timed out error when installing any distro using wsl. The only thing I can think of that is stopping me is that I upgraded to windows 11 on unsupported hardware (i7 7700k) otherwise I have everything else installed and working. I have hyper v running and actually made a couple virtual machines but trying to install kali or debian from admin terminal gives me the timed out error

Edit: wsl --update doesn't fix it

@carlzxc71
Copy link

can confirm that running wsl --update fixes it. Despite it saying "no updates available", running the ubuntu app (which registers ubuntu) works after that

Can confirm this fixed it for me.
Running Windows 10 22H2

@Julescs0
Copy link

Julescs0 commented Jul 4, 2023

I wast times with this issue. Next I just run Ubuntu app under administrator. Who would have thought! It works!

I did this (and restarted hyper v compute service actually while install was trying to run) and it worked. So it was for sure for me one of these that fixed it. So thanks.

@dbaileyut
Copy link

dbaileyut commented Aug 8, 2023

Updating to the pre-release version (1.3.15) works for me. Nothing else worked on Windows 11 (10.0.22621.1992), updated to July 2023.

> wsl --update --pre-release
Checking for updates.
Updating Windows Subsystem for Linux to version: 1.3.15.

@ChrisLynchHPE
Copy link

For me, I was trying to launch a brand-new instance of WSL2 on a brand-new Windows 11 VM (10.0.22621, running in Hyper-V host with AMD Epyc processors) and wsl would fail to install a distro when launching within PowerShell 7. I switched to a command prompt and Ubuntu installed fine. I can launch it from PowerShell 7 console as well just by calling wsl.exe.

@amprebonne
Copy link

I wast times with this issue. Next I just run Ubuntu app under administrator. Who would have thought! It works!

Just worked for me too

@PyroGenesis
Copy link

Updating to the pre-release version (1.3.15) works for me. Nothing else worked on Windows 11 (10.0.22621.1992), updated to July 2023.

> wsl --update --pre-release
Checking for updates.
Updating Windows Subsystem for Linux to version: 1.3.15.

Thank you @dbaileyut, updating to prerelease 2.0.7 and then launching Ubuntu as Administrator worked for me when nothing else worked.

@dukekautington3rd
Copy link

I landed here and none of the above recommendations helped (Although I appreciate).
Tried: [run as root, dis/reenable hyperv, unregister wsl, install different wsl distro]
Here was my situation:
Running Win 11 pro Guest inside of KVM. Needed to add a feature flag to my CPU definition in my VM(virt-manager) config. Specifically the "feature policy" subdirective.

  <cpu mode="host-passthrough" check="none" migratable="on">
    <topology sockets="1" dies="1" cores="10" threads="2"/>
    <feature policy="disable" name="hypervisor"/>
  </cpu>

@mounikaprat
Copy link

i have no clue if this is gonna help anyone else, but just in case, i'll post what fixed it for me:

i was struggling with this issue for a long time and it was absolutely frustrating. none of the solutions online helped at all. just a few moments ago, however, i stumbled upon my old .wslconfig file that i had made 2 years ago and completely forgot about.

after opening it up in notepad, i immediately remember what i had done here: the last time i had WSL up and running, i felt that by default it was using too much ram for my taste, and i wanted the bare minimum to be able to run some minor things on it (which was AFTER the installation of a distro)

i had the RAM limit for WSL set to 256MB of RAM. which, unsurprisingly, was causing all subsequent attempts at distro installations to fail. upping that limit to 6144MB / 6GB immediately fixed the issue and I was able to finally install distros.

for reference, here is what my .wslconfig looks like now:

[wsl2]
memory=6144MB
processors=8

even if you don't already have this file in your user folder, maybe you could try creating this file (put it in C:\Users\YourProfile) and seeing if it makes any difference (of course adjusting these based on your actual system specs) but at minimum i would set it to whatever the official minimum RAM requirement is for the distro you're wanting to install

Thanks so much it worked for me

@dhruvmsheth
Copy link

finally fixed it. nothing in the comments above helped me. I navigated to the .wslconfig files placed in /Users/<username>/ and opened .wslconfig file with a text editor and removed a line which redirected the kernel to a non-existent directory. Make sure the config file only says [wsl2]

@aaghashm
Copy link

@Bekaryss im facing the same issue now. i have even reset my pc but nothing seems to work. any idea what to do?

@Kripesh-Das
Copy link

someone help me man
the issue still persists

@Bekaryss
Copy link

My problem was resolved

1). Resolved after uninstalling the cumulative update for Windows 11, KB5043145.
#12087

2). Other option:
wsl.exe --set-default-version 1
wsl.exe --install -d Ubuntu
wsl.exe --set-default-version 2

It still doesn't work with Docker, but at least WSL responds and works.

@IP-Developer
Copy link

Can confirm that uninstalling KB5043145 fixed the issue (which started after it was installed).

@cmyllis
Copy link

cmyllis commented Oct 1, 2024

Same here. I can confirm that too. Had problem with docker desktop not opening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests