WSL icon indicating copy to clipboard operation
WSL copied to clipboard

"WSL2 is not supported with your current machine configuration" after enabling Hyper-V, Virtual Machine Platform, Windows Subsystem for Linux, Hypervisor Platform and virtualization in up-to-date bios.

Open SirDarwin opened this issue 3 years ago • 35 comments

Version

Microsoft Windows [Version 10.0.19045.2604]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

Default Distribution: docker-desktop-data Default Version: 2

Distro Version

Ubuntu (cannot run lsb_release -r)

Other Software

Docker Desktop for Windows

Client: Cloud integration: v1.0.29 Version: 20.10.21 API version: 1.41 Go version: go1.18.7 Git commit: baeda1f Built: Tue Oct 25 18:08:16 2022 OS/Arch: windows/amd64 Context: default Experimental: true

Repro Steps

I installed WSL sometime around fall of 2022. I had installed Docker some time before that but had never done anything with it. WSL was working fine for me in the fall, but I didn't use it for several months until around mid January, when I discovered this problem. Here are all the screenshots I posted on my Microsoft support thread, before the support person directed me here. OptionalFeatures msinfo32_s6Zlfujlt1 image image image

Expected Behavior

Working WSL and Docker

Actual Behavior

WSL2 is not supported with your current machine configuration. Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. For information please visit https://aka.ms/enablevirtualization Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102

after running most wsl commands in Command Prompt (both elevated and non-elevated).

Diagnostic Logs

No response

SirDarwin avatar Feb 17 '23 17:02 SirDarwin

Hey Darwin, I opened an exact same ticket. Let's keep in touch if someone comments on either of our threads, eh?

rnertney avatar Feb 18 '23 23:02 rnertney

same issue. I had just got WSL2 working yesterday.

Today there was a power outage and my laptop was shutdown fully.

Now I get the above message.

Virtualization is enabled so the message is in error.

Edit: looks like the first restart after the outage caused the hp laptop to reset UEFI to defaults and virtualization was actually turned off. That said this may not always be the case since I found out previously that turning off DEP or CFG in windows security exploit settings will also return a virtualization error so the message seems to be false firing all the time...

hyobd avatar Mar 17 '23 21:03 hyobd

Hi all,

I was facing the same issue this morning:

WSL2 is not supported with your current machine configuration. Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. For information please visit https://aka.ms/enablevirtualization Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102

even though all the features were turned on: Hyper-V, Virtual Machine Platform, Windows Subsystem for Linux.

Then, I remembered that I wanted to set up macOS via VirtualBox and that I needed to run the following command in cmd:

bcdedit /set hypervisorlaunchtype off

After executing the command below:

bcdedit /set hypervisorlaunchtype auto

and after restarting the machine, I was able to successfully start the wsl2 again.

Hope it helps!

nikolamicic21 avatar Mar 18 '23 13:03 nikolamicic21

Then, I remembered that I wanted to set up macOS via VirtualBox and that I needed to run the following command in cmd:

bcdedit /set hypervisorlaunchtype off

After executing the command below:

bcdedit /set hypervisorlaunchtype auto

and after restarting the machine, I was able to successfully start the wsl2 again.

Exactly the same scenario here. Now it worked, thanks!

krisrok avatar Apr 04 '23 06:04 krisrok

what worked for me was to reset bios to default settings then enable SVM

BindingOx avatar Apr 08 '23 04:04 BindingOx

Please continue this thread, I have the same issue and no solutions work. There is no virtualization option in my BIOS but taskmgr says i have it enabled.

neksodebe avatar Jul 22 '23 11:07 neksodebe

Please continue this thread, I have the same issue and no solutions work. There is no virtualization option in my BIOS but taskmgr says i have it enabled.

Have you tried updating to the latest version of the BIOS?

huntyboy102 avatar Jul 25 '23 13:07 huntyboy102

what worked for me was to reset bios to default settings then enable SVM

this one worked for me, thanks a lot

andyfeated avatar Jul 27 '23 21:07 andyfeated

After executing the command below:

bcdedit /set hypervisorlaunchtype auto

and after restarting the machine, I was able to successfully start the wsl2 again.

Hope it helps!

It works for me, thanks

Bangik avatar Aug 12 '23 04:08 Bangik

On my setup, I have to:

bcdedit /set hypervisorlaunchtype auto

cold reboot, then I get:

The operation timed out because a response was not received from the virtual machine or container. Error code: Wsl/Service/CreateInstance/HCS_E_CONNECTION_TIMEOUT Press any key to continue...

Then:

bcdedit /set hypervisorlaunchtype off

Then it works without rebooting.

If I power down, it often comes up broken again and the process has to be repeated. It may have something to do with whether wsl is shut down before powering down.

Although this works, it is very inefficient.

j1s1e1 avatar Oct 05 '23 10:10 j1s1e1

bcdedit /set hypervisorlaunchtype auto

This worked for me thanks!

elliottnick avatar Oct 18 '23 02:10 elliottnick

Hi all,

I was facing the same issue this morning:

WSL2 is not supported with your current machine configuration. Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. For information please visit https://aka.ms/enablevirtualization Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102

even though all the features were turned on: Hyper-V, Virtual Machine Platform, Windows Subsystem for Linux.

Then, I remembered that I wanted to set up macOS via VirtualBox and that I needed to run the following command in cmd:

bcdedit /set hypervisorlaunchtype off

After executing the command below:

bcdedit /set hypervisorlaunchtype auto

and after restarting the machine, I was able to successfully start the wsl2 again.

Hope it helps!

Thank you! It works for me ❤️

VanLamCS avatar Oct 26 '23 11:10 VanLamCS

G'day,

I'm having apparently the same issue. Have been running WSL2 for quite some time, but had my bios reset to default conditions (got disconnected from mains, and the onboard battery had died).

This meant, for a little while, I was booting up with Virtualization disabled in the bios. I noticed that there was a 'configuring windows -> reboot required' thing that happened, whilst I was unaware.

So, I go to open windows terminal to do some work, and don't yet get the error we're getting - but a slightly different one complaining just that virtualization is disabled in the bios. I reboot, and sure enough.

So it gets throughly reenabled, including a change disabling CSM (which I was booting many years, and consequently running without VTd) so that VTd could also be enabled (along with resizable BAR), the latter two settings had been causing my system to go into a reboot loop when enabled (because they couldn't work with CSM). So, side issue, but I think relevant here possibly, since it's the only other major configuration change.

Rebooted, started windows terminal: And I don't merely get the error, I get it in triplicate!

WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualisation is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102
WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualisation is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102
WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualisation is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102
Press any key to continue...

Huh? Did I not enable it?

Okay, through the bios again, and yes, it is certainly still enabled.

Back into a Admin power shell, I try a few things:

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform, Microsoft-Windows-Subsystem-Linux
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype auto

All of the above commands, btw, seemed to proceed and complete normally.

But still no luck after reboot, and every attempt to start up still hits the same result.

image

How is this still possible then?

Attempts to start a hyper-v VM also fail with an error message 'Hypervisor not running' with the usual about enabling virtualization in bios.

I'm going to try with a generic DISM /online /cleanup-image /restorehealth and reboot, and failing that, will try disabling VTd and test, and re-enable CSM and test.

RGD2 avatar Nov 18 '23 07:11 RGD2

Same issue still, No luck with any of the above.

RGD2 avatar Nov 18 '23 08:11 RGD2

Perfecto, a mí me funcionó con:

bcdedit /set hypervisorlaunchtype off

After executing the command below:

bcdedit /set hypervisorlaunchtype auto

and after restarting the machine, I was able to successfully start the wsl2 again.

Muchas gracias nikolamicic21, llevaba días con este problema.

veracubano avatar Jan 06 '24 19:01 veracubano

I tried all this and still have no success. WSL 1 works however

userlandkernel avatar Mar 24 '24 02:03 userlandkernel

This worked for me, do not skip over 2. step : If you don't know how to perform 2. step just write 'your laptop brand bios' and do it. Mine is hp and I pressed 'esc' during opening. image

yssfklc avatar Apr 23 '24 07:04 yssfklc

Screenshot 2024-04-29 160054

CBAJoker avatar Apr 30 '24 05:04 CBAJoker

Hi all,

I was facing the same issue this morning:

WSL2 is not supported with your current machine configuration. Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. For information please visit https://aka.ms/enablevirtualization Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102

even though all the features were turned on: Hyper-V, Virtual Machine Platform, Windows Subsystem for Linux.

Then, I remembered that I wanted to set up macOS via VirtualBox and that I needed to run the following command in cmd:

bcdedit /set hypervisorlaunchtype off

After executing the command below:

bcdedit /set hypervisorlaunchtype auto

and after restarting the machine, I was able to successfully start the wsl2 again.

Hope it helps!

It works for me! for docker WSL error

yanxel18 avatar Jul 29 '24 05:07 yanxel18

G'day,

I'm having apparently the same issue. Have been running WSL2 for quite some time, but had my bios reset to default conditions (got disconnected from mains, and the onboard battery had died).

This meant, for a little while, I was booting up with Virtualization disabled in the bios. I noticed that there was a 'configuring windows -> reboot required' thing that happened, whilst I was unaware.

So, I go to open windows terminal to do some work, and don't yet get the error we're getting - but a slightly different one complaining just that virtualization is disabled in the bios. I reboot, and sure enough.

So it gets throughly reenabled, including a change disabling CSM (which I was booting many years, and consequently running without VTd) so that VTd could also be enabled (along with resizable BAR), the latter two settings had been causing my system to go into a reboot loop when enabled (because they couldn't work with CSM). So, side issue, but I think relevant here possibly, since it's the only other major configuration change.

Rebooted, started windows terminal: And I don't merely get the error, I get it in triplicate!

WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualisation is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102
WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualisation is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102
WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualisation is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/0x80370102
Press any key to continue...

Huh? Did I not enable it?

Okay, through the bios again, and yes, it is certainly still enabled.

Back into a Admin power shell, I try a few things:

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform, Microsoft-Windows-Subsystem-Linux
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype auto

All of the above commands, btw, seemed to proceed and complete normally.

But still no luck after reboot, and every attempt to start up still hits the same result.

image

How is this still possible then?

Attempts to start a hyper-v VM also fail with an error message 'Hypervisor not running' with the usual about enabling virtualization in bios.

I'm going to try with a generic DISM /online /cleanup-image /restorehealth and reboot, and failing that, will try disabling VTd and test, and re-enable CSM and test.

Powershell script realy helped, thank you man!

svili98 avatar Aug 22 '24 19:08 svili98