microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.55k stars 823 forks source link

Error 0x80370102 #4120

Closed sieja closed 10 months ago

sieja commented 5 years ago

git git1

i Reinstalled wsl and virtual machine in Windows features

Devnoob876 commented 4 years ago

image i am also having the same issue and i also installed the packages as showed in the up and i also enabled the VTX and virtualization but still i am having the same issue. Please help

beebase commented 3 years ago

To fix the problem, just execute this as administrator, then reboot : bcdedit /set hypervisorlaunchtype auto

It's 100% working for me 😉 For VirtualBox user : this option will slow down you VMs, you can roll back with bcdedit /set hypervisorlaunchtype off

This solution should be pasted all over the internet. Just lost one day of my life searching for a solution that turns out to be one line of code. And indeed, when trying to start up my VMware player, we need to switch back to "bcdedit /set hypervisorlaunchtype off". Yep, makes sense...

ratatatKE commented 3 years ago

git git1

i Reinstalled wsl and virtual machine in Windows features

I solved this by upgrading my windows build from 18363 to 19042 which is the October 2020H2 update. All other fixes were not working. However bumping my build number and upgrading the build of Windows magically solved everything. I am now running on WSL2 and my reason for update was so that I could run docker containers and test my deployments. Attached is a screenshot of my current version and WSL version.

image

Nikakz commented 3 years ago

Depois de fazer praticamente tudo que li pela internet, o que resolveu foi que para quem usa CPU AMD, além de habilitar no BIOS o SVM tem que habilitar o NX também, após fazer isso o erro desapareceu e instalou normalmente.

ndtxt commented 3 years ago

When I tryed to install current version Ubuntu it's faild with

WslRegisterDistribution failed with error: 0x80370102

solution that helped me:

  1. wsl --set-default-version 2 command actually doesn't work for me
  2. that's why I have set default wsl version to 1 wsl --set-default-version 1
  3. after that I could install Ubuntu without any error Image 1
  4. then set wsl 2 manually for current Ubuntu wsl --set-version Ubuntu 2 Image 3
  5. Done.

All thanks to the author of this post

JuergenKindler commented 3 years ago

I have the problem

WslRegisterDistribution failed with error: 0x80370102 Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.

when trying to install Docker for Windows on a Windows 10 professional 2020H2 installation that runs in a VirtualBox under Ubuntu 20 on a Dell 7530 ( Intel® Core™ i7-8850H CPU @ 2.60GHz × 12 ) with secure boot and virtualization enabled on BIOS level. ( This is a completely fresh installation, so I wonder what could have gone wrong. ) As as as I understand the hardware / bios should support all that is needed in general.

Does this mean that WSL 2 is not at all supported for Windows 10 running as a VirtualBox VM ? Is there a way to figure out the root cause for the failure ?

mIcHyAmRaNe commented 3 years ago

Hello

as most of people, i have virtualization enabled in bios, and enabled requested windows features but still having error message WslRegisterDistribution failed with error: 0x80370102

i did many research and i think there are only one reason for not getting wsl2 to work that's due to hardware non supporting Second Level Address Translation (SLAT) for hyper-v which is now required instead of recommended.

open cmd
run command: > systeminfo 
check Hyper-V Requirements at the end:      
                           VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: No
                           Data Execution Prevention Available: Yes

if you have No means that you can't use wsl2

Have a good day

JuergenKindler commented 3 years ago

So that means, I cannot run Windows in a VM on a Linux host and use WSL 2 ?

PS C:\Windows\system32> systeminfo.exe ... OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19042 N/A Build 19042 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free Registered Owner: Windows User ... Original Install Date: 04/01/2021, 12:10:20 System Boot Time: 06/01/2021, 07:41:59 System Manufacturer: innotek GmbH System Model: VirtualBox System Type: x64-based PC Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz BIOS Version: innotek GmbH VirtualBox, 01/12/2006 ... Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.

mIcHyAmRaNe commented 3 years ago

@JuergenKindler wsl2 can be run inside a VM using VMware workstation (version >15.5) as they said in their blog, VMware Workstation/Player can now run when Hyper-V is enabled.

but i dont know if it's the same case with virtualbox

FabioCiribeli commented 3 years ago

hi @benhillis.

I'd like to share the same thing, but in my case I am using Windows Virtual Machine by VMware and I tried to use WSL with ubuntu and the error code 0x80370102 happened even doing all steps for WSL installation. Then It works when I have Enabled Virtualization in the VM Ware settings

VM-setting

Thanks.

mvanotti commented 3 years ago

I have this same problem, but so far I had no luck figuring out how to fix it.

in msinfo, I get:

OS Name Microsoft Windows 10 Home
Version 10.0.19042 Build 19042
System Manufacturer Microsoft Corporation
System Model Surface 3
System Type x64-based PC
System SKU Surface_3
Processor Intel(R) Atom(TM) x7-Z8700 CPU @ 1.60GHz, 1601 Mhz, 4 Core(s), 4 Logical Processor(s)
BIOS Version/Date American Megatrends Inc. 1.51116.238, 3/9/2015
SMBIOS Version 2.8
Embedded Controller Version 255.255
BIOS ode UEFI
Installed Physical Memory (RAM) 4.00 GB
Hyper-V - VM Monitor Mode Extensions Yes
Hyper-V - Second Level Address Translation Extensions Yes
Hyper-V - Virtualization Enabled in Firmware Yes
Hyper-V - Data Execution Protection Yes

Note that VirtualBox and VmWare Player seem to work without issues. I tried using Windows 10 Pro, but had the same issue.

I opened WinDBG and looked at the IA32_FEATURE_CONTROL MSR (0x3A) and it reports value 0x5 (Locked + VMX Enabled)


Edit: Forgot to mention the things I tried:

I did the bcdedit /set hypervisorlaunchtype auto, but that didn't work. I also removed and added both WSL and VirtualMachinePlatform from windows features (altogether and each one separatedly).

mvanotti commented 3 years ago

I went ahead and installed Windows Pro + Hyper-V, launching Hyper-V VMs would fail saying that the hypervisor is not running, even though the services were running.

Looking at the event log, I found the following message:

Hyper-V launch failed; the Hyper-V boot loader was unable to allocate sufficient resources to perform the launch.

It seems like 4GiB of ram might not be enough to run Hyper-V (maybe it is because some of the ram goes to the onboard video card memory?)

Davidxdh0 commented 3 years ago

Found a solution. @mvanotti Found this https://blog.johannfenech.com/fix-wslregisterdistribution-failed-with-error-0x80370102/ Had to change my WSL setting to 1 instead of 2. Didn't change the bios setting yet, might do it in the future.

VadneyK commented 3 years ago

@Davidxdh0 your link seems to be hyper linked to https://github.com/microsoft/WSL/issues/url for some reason as I am taken there when I click the link. copy pasting the link into the browser seems to works tho. However your link fix doesn't work for users who have Legacy BIOS instead of UEFI BIOS meaning the BIOS is uneditable ;(

Hello I am trying to install WSL2 on Ubuntu 20.04. my BIOS is Legacy. Does this actually mean I cannot change the virtualization settings as stated here?

I ran through all of the steps in many official documentations but I cant turn Virtualization on: Capture

More settings info: Capture

systeminfo32 tells me I have legacy: Capture

off topic but I'm using this old windows bc my new mac M1 isnt compatible with a bunch of things I need to code but even this backup is having issues and I am big sad ;{

VadneyK commented 3 years ago

temporary fix: use ws1 instead of ws2: wsl --set-default-version 1 then just run the ubuntu from the startup

Mtdominic commented 3 years ago

If you're using HyperV, shutdown the VM and use this script in PowerShell:

set-vmprocessor nameofyourvm -ExposeVirtualizationExtensions $true

Next, disable dynamic RAM (HyperV) and start the VM.

AdityaBiswas321 commented 3 years ago

I was able to fix it by enabling virtualization in the bios, and enabling Hyper V after, if virtualization is not enabled in the bios the dropdown in Hyper V will have a greyed-out option.

jzcusst commented 3 years ago

temporary fix: use ws1 instead of ws2: wsl --set-default-version 1 then just run the ubuntu from the startup

good solutions ,it works.

rediffusion commented 3 years ago

VadneyK

You're a life saver!

Amondale commented 3 years ago

WSLg will it run inside a VM running Beta Windows 11??

rin67630 commented 3 years ago

I had tested pretty much everything: Virtualization was enabled in the Bios but did not show up in the task manager. Intel VT-d was enabled too. Finally disabling Intel TXT in the bios solved the issue: Virtualization showed up an everything came like is should.

xmh0511 commented 3 years ago

This tutorial works for me.

sesm commented 3 years ago

In my case I didn't have vritualization enabled in BIOS. After I enabled it the error went away.

aslisubhash commented 3 years ago

When I tryed to install current version Ubuntu it's faild with

WslRegisterDistribution failed with error: 0x80370102

solution that helped me:

  1. wsl --set-default-version 2 command actually doesn't work for me
  2. that's why I have set default wsl version to 1 wsl --set-default-version 1
  3. after that I could install Ubuntu without any error Image 1
  4. then set wsl 2 manually for current Ubuntu wsl --set-version Ubuntu 2 Image 3
  5. Done.

All thanks to the author of this post

Thanks

AIWintermuteAI commented 3 years ago

On Surface 3, Windows 10 Home, 21H1, 19043.1237. After trying

I can install Ubuntu version 1, but when I try to convert it to 2 with wsl --set-version Ubuntu 2 I get conversion error. Installing it directly with wsl --set-default-version 2 gives me the above error 0x80370102.

@jackchammons any hope of running wsl 2 for this case or at least understanding which feature is missing?

funkel1989 commented 2 years ago

sorry for reviving this issue here, but figured i'd post since its still open. I'm having the exact same error described here. I'm on windows 11 21H2 OS build 22000.527. I've tried everything listed in this issue since its creation except doing a clean install yet the issue persists. I've validated my hardware supports this and can run hyper v vms and vm's with other systems.

Has anyone encountered this on windows 11 and know if the solution to make it work is any different. wsl1 does work but i'm stubborn and want wsl 2

comiker91 commented 2 years ago

I fixed this problem with the 21H2 Update for win 10 (10.0.19044.1586)

Maybe it help somebody else

dancebunny98 commented 2 years ago

wsl --set-default-version 1 - fix my problem

win 10 x64 21h2 19044.1706 xeon 2678 v3

Saeeed-B commented 2 years ago

wsl --set-default-version 1 - fix my problem

win 10 x64 21h2 19044.1706 xeon 2678 v3

also for me

JamesGalt69 commented 2 years ago

wsl --set-default-version 1 - fix my problem

win 10 x64 21h2 19044.1706 xeon 2678 v3

Fixed the issue for me - and really quick too! Hours of frustration solved by a single line of code. Love it.

aurorapar commented 2 years ago

Can enabling NX please be added to documentation? This would severely reduce the amount of time trying to solve the issue of not being able to install a distro on WSL.

s-taylor commented 1 year ago

I only mentioned it because I already tried. I made sure to run the Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform command of course. It gave me the error listed above when I attempted to initialize Debian, 80370102.

Thankyou, this fixed it for me.

JOduMonT commented 9 months ago

Today, while I reinstated Windows 11, I ran into that issue, which was ode because it was working right before.

With only Windows Subsystem for Linux features activated, no need Hyper-V...

I resolved it by doing an update: wsl --update

Naties29 commented 7 months ago

wsl --set-default-version 1

Thank you so much! This solved my issue as well. I was stuck on this for a while on this one! Thank you again.