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 fails to run any distros with error 0x80370102 #7068

Closed
BobbyBaratheon opened this issue Jun 15, 2021 · 32 comments
Closed

WSL2 fails to run any distros with error 0x80370102 #7068

BobbyBaratheon opened this issue Jun 15, 2021 · 32 comments

Comments

@BobbyBaratheon
Copy link

Microsoft Windows [Version 10.0.19043.1052]
Fresh install of WSL, hypervisors platform, virtual machine platform, windows subsystem for Linux, and WSL2 update installed. CPU Virtualization is enabled, but no distro can setup.
Screenshot 2021-06-15 163827
Screenshot 2021-06-15 164112
Screenshot 2021-06-15 164134
Screenshot 2021-06-15 164222

can anyone help?

@therealkenc
Copy link
Collaborator

#4120. Please collect WSL logs and post the backlink to the feedback item here.

@BobbyBaratheon
Copy link
Author

https://aka.ms/AAcxty9

@ghost ghost removed the needs-author-feedback label Jun 16, 2021
@therealkenc therealkenc added the failure-to-launch failure to launch label Jun 16, 2021
@benhillis
Copy link
Member

@BobbyBaratheon - can you verify that virtualization is enabled in your BIOS?

Easiest way is to look at msinfo32.exe

@jbciardi
Copy link

Says it is right in the cmd picture

Virtualization Enabled In Firmware: Yes

@OneBlue
Copy link
Collaborator

OneBlue commented Jun 22, 2021

Root cause appears to be:

{"Error":-2143878910,"ErrorMessage":"The virtual machine could not be started because a required feature is not installed.","ErrorEvents":[{"Message":"Cannot create system 'ECEAFECC-E667-42F2-98BB-59AB37EABD25' since Hyper-V is not installed on the host."

Maybe something went wrong when the features were enabled.
Can you to disable the virtual machine platform, reboot, enable it again, reboot again try to run wsl ?

@Dalot
Copy link

Dalot commented Jul 2, 2021

I am having the same problem. I've tried disabling and enabling Virtual machine platform between restarts and it did not work. I've also did for Virtualization in the BIOS and it also did not work and I've tried a complete wsl reinstall as well without any success.

@Amondale
Copy link

So I'm looking at the same error in W11 10.0.22000 on a Hyper-V VM. Best guess is problem has to do with missing TPM? I get the impression WSLg won't run on a VM, as no distro will install. Like the OP my error is:

PS C:\WINDOWS\system32> ubuntu
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.

Press any key to continue...

@Amondale
Copy link

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.

This comment from another issue allowed WSL2/WSLg to run. The error text Error: 0x80370102 The virtual machine could not be started IMO was misleading, as I was already inside a "virtual machine"?? Maybe I'm overthinking as usual :)?

@tronix3
Copy link

tronix3 commented Aug 19, 2021

I'm having the same issue. WSL1 ran perfectly fine but WSL2 has not worked since it was released. I have Virtualization turned on, HyperV, etc. I have tried disabling them and reenabling, restarting, removing the ubuntu app and reinstalling. All to no avial.

@tfmertz
Copy link

tfmertz commented Aug 19, 2021

Having this same issue. I was running wsl2 with no issues for around 4 months using docker to develop until around June 12th, 2021. Then I guess I updated windows and it hasn't worked since (or my wife installed Revit 2020, but I uninstalled it and it still doesn't work). I used to get the error that the Virtual Machine Platform wasn't installed so I couldn't open Ubuntu. So I backed up the Local State/ext4.vhdx (because wsl exporting feature won't work without the distro working apparently) And uninstalled VMP, WSL features, and the linux kernel update and my ubuntu distros. Then reinstalled them all following these instructions https://docs.microsoft.com/en-us/windows/wsl/install-win10.

Some system details:
Version 21H1 (OS Build 19043.1165)
Windows 10 Home
Task manager on performance tab has Virtualization: Enabled.

I've tried a bunch of different solutions in a ton of different threads which have included a sampling of, uninstall docker desktop, uninstall and reinstall VMP and WSL features and distros, Set hyper-v launch type in bcdedit to auto, install VMP and WSL features, turn off virtualization in bios, enable virtualization in bios, and reinstall following the installation instructions above, restarting throughout the process, update some weird networking configurations, testing with windows hypervisor platform feature installed or uninstalled.

The one thing I can't do is enable/disable hyper-V feature because (I think) I'm on Windows 10 Home, which doesn't have hyper-V? (idk I just read it on this page https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/hyper-v-requirements)

Though if I uninstall WSL completely I get information in my systeminfo that says hyper-v is up and running correctly, which is weird. With WSL installed it only says that it has detected a hypervisor so it doesn't show hyper-v info.

System Info:
hypervisor-detected

Window Features:
windows-features

I can't include the .etl file because github doesn't support it, I'll try to run through that weird feedback workflow.
EDIT Feedback link is here: https://aka.ms/AAdjc3r

Been stuck on this for at least 2 months, would love to get some of my projects back that are stuck on WSL. Any help is greatly appreciated. Thanks!

@ghost
Copy link

ghost commented Sep 1, 2021

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

@Manguil
Copy link

Manguil commented Sep 27, 2021

Hello, I have the same problem except that my computer does not restart and runs the automatic recovery.

@tfmertz
Copy link

tfmertz commented Oct 8, 2021

Still experiencing this exact same issue, what feedback can we provide? Or should we open separate tickets? Thanks.

@tfmertz
Copy link

tfmertz commented Oct 27, 2021

A very strange thing happened to me today. I went to boot up Ubuntu WSL 2 just to test and see if it was still broken and I got a completely different error that directly me to this issue: #4103 After uncompressing my LocalState folder (like this comment says: #4103 (comment)) Ubuntu installed correctly without a hitch and I'm using WSL 2 again now.

Super weird, I didn't change any virtualization settings or anything. Maybe windows update happened and somehow I got a better error message, so I could finally resolve this issue. Anyway, hope it helps.

@jbciardi
Copy link

Lol, after this long, I just upgraded to windows 11 and now it works fine, i can even use the GUI apps which is cool too. I never figured out what caused the original error tho, wish I did.

@bacchus101
Copy link

Having the exact opposite issue. I upgraded to windows 11 on the same hardware, with the exact same settings and now getting - Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.

Virtualization is enabled. The linux subsystem is installed. Ubuntu is installed. Not sure what else I can do. Been running this for years without issue before the change to windows 11.

@AlienXAXS
Copy link

Hi, I am also having the same issue on Windows 11.

Feedback: https://aka.ms/AAf0rot

@HunterZ
Copy link

HunterZ commented Dec 18, 2021

Same issue on Windows 11 Home. If I turn off the hypervisor via bcdedit, it shows all required features available. Setting it back to auto with WSL, VM Platform, and Hypervisor Platform features enabled (and, yes, toggled many times) and rebooting results in Event Log showing failure to run WSL2 due to Hyper-V not installed on host.

@JuanTorchia
Copy link

JuanTorchia commented Dec 20, 2021

Same issue here windows 11

image

image

image

Edit: I made a new installation of windows 11 and the problem doesn't present again I have wsl working well.

@swanserquack
Copy link

Guess I'm going to be another person to hop on this band of people reporting this. Same issue here, the same error message and everything enabled and setup. Guess this is just going to be ignored.

@HunterZ HunterZ mentioned this issue Jan 6, 2022
2 tasks
@lonestriker
Copy link

I had this same error as well. Virtualization was enabled in BIOS, Task Manager Performance tab showed it was activated. But still could not get WSL2 to work after many updates and reboots.

What fixed my problem in the end was:

  • Open Control Panel -> Programs -> Turn Windows features on or off
  • Disable Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Re-enable the features that were disabled: Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Open a Administrator Powershell and run:
    wsl --set-default-version 2
    wsl --install -d Ubuntu
  • And it finally worked

Hope that helps others.

@markjasper
Copy link

This worked for me. Enable Hypervisor using; bcdedit /set hypervisorlaunchtype auto

@Amondale
Copy link

@markjasper if you are running VirtualBox this setting may work to re-enable wsl, but it will cause some severe issues with VirtualBox (and Hyper-V as I recall).

@oblivisheee
Copy link

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 ?? ??????? ????????? ??????????? ??????, ????????? ??????????? ??????? ?? ???????????.

guys what to do with it?

@JuanTorchia
Copy link

Error: 0x80370102

Make sure virtualization is enabled within the computer's BIOS. Instructions on how to do this will vary from computer to computer and this feature will most likely be under CPU related options.
WSL2 requires that the CPU support the Second Level Address Translation (SLAT) feature, which was introduced in Intel Nehalem (1st generation Intel Core) and AMD Opteron processors. Older CPUs (such as Intel Core 2 Duo) will not be able to run WSL2, even if the virtual machine platform is installed correctly.

@MADM1k33
Copy link

I had this same error as well. Virtualization was enabled in BIOS, Task Manager Performance tab showed it was activated. But still could not get WSL2 to work after many updates and reboots.

What fixed my problem in the end was:

  • Open Control Panel -> Programs -> Turn Windows features on or off
  • Disable Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Re-enable the features that were disabled: Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Open a Administrator Powershell and run:
    wsl --set-default-version 2
    wsl --install -d Ubuntu
  • And it finally worked

Hope that helps others.

That helped - thanks!

@MediaMaquina
Copy link

I had this same error as well. Virtualization was enabled in BIOS, Task Manager Performance tab showed it was activated. But still could not get WSL2 to work after many updates and reboots.

What fixed my problem in the end was:

  • Open Control Panel -> Programs -> Turn Windows features on or off
  • Disable Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Re-enable the features that were disabled: Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Open a Administrator Powershell and run:
    wsl --set-default-version 2
    wsl --install -d Ubuntu
  • And it finally worked

Hope that helps others.

Thanks woohoo!!!!!!!!

@davidmold
Copy link

This doesn't work. I have done tried every recommended method. I have a brand new windows 11 machine it is June 2024. Why is this so hard?

@JoshuaEA54
Copy link

This doesn't work. I have done tried every recommended method. I have a brand new windows 11 machine it is June 2024. Why is this so hard?

Have you found a solution yet?

@davidmold
Copy link

This doesn't work. I have done tried every recommended method. I have a brand new windows 11 machine it is June 2024. Why is this so hard?

Have you found a solution yet?

Yes. It is nearly always some weird bios setting that is the problem.

@SandroCast
Copy link

Eu tive esse mesmo erro também. A virtualização estava habilitada no BIOS, a aba Desempenho do Gerenciador de Tarefas mostrou que estava ativada. Mas ainda não consegui fazer o WSL2 funcionar depois de muitas atualizações e reinicializações.

O que resolveu meu problema no final foi:

  • Abra o Painel de Controle -> Programas -> Ativar ou desativar recursos do Windows
  • Desabilitar Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform e Windows Subsystem para Linux
  • Reinício
  • Reative os recursos que foram desabilitados: Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform e Windows Subsystem for Linux
  • Reinício
  • Abra um PowerShell de administrador e execute:
    wsl --set-default-version 2
    wsl --install -d Ubuntu
  • E finalmente funcionou

Espero que ajude outros.

Funcionou perfeito. Muito obrigado!!

@Mozilan1216
Copy link

I had this same error as well. Virtualization was enabled in BIOS, Task Manager Performance tab showed it was activated. But still could not get WSL2 to work after many updates and reboots.

What fixed my problem in the end was:

  • Open Control Panel -> Programs -> Turn Windows features on or off
  • Disable Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Re-enable the features that were disabled: Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Subsystem for Linux
  • Reboot
  • Open a Administrator Powershell and run:
    wsl --set-default-version 2
    wsl --install -d Ubuntu
  • And it finally worked

Hope that helps others.

我也遇到了同样的错误。BIOS 中启用了虚拟化,任务管理器性能选项卡显示它已激活。但经过多次更新和重启后,仍然无法让 WSL2 工作。

最终解决我的问题的是:

  • 打开控制面板 -> 程序 -> 打开或关闭 Windows 功能
  • 禁用 Hyper-V、虚拟机平台、Windows 虚拟机管理程序平台和适用于 Linux 的 Windows 子系统
  • 重启
  • 重新启用已禁用的功能:Hyper-V、虚拟机平台、Windows 虚拟机管理程序平台和适用于 Linux 的 Windows 子系统
  • 重启
  • 打开管理员 Powershell 并运行:
    wsl --set-default-version 2
    wsl --install -d Ubuntu
  • 终于成功了

希望这对其他人有帮助。

That works!Thank for your help.I've tried for the whole day!

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

No branches or pull requests