microsoft / WSL

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

WslRegisterDistribution failed with error: 0x80370102 #7638

Open Holight opened 2 years ago

Holight commented 2 years ago

Version

Microsoft Windows [Version 10.0.22000.282]

WSL Version

Kernel Version

5.10.60.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Start PowerShell (Admin). Run "wsl --install -d ubuntu"

Expected Behavior

Install successfully.

Actual Behavior

It shows: "Ubuntu is already installed. Launching Ubuntu..."

Then in a new command window: "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..."

Diagnostic Logs

No response

zausenecz commented 2 years ago

try to create any virtual machine via hyper-v

benhillis commented 2 years ago

is virtual machine platform enabled?

Holight commented 2 years ago

try to create any virtual machine via hyper-v

Creating any virtual machine via Hyper-V also fails, with error "The Virtual Machine Management Service failed to start the virtual machine 'New Virtual Machine' because one of the Hyper-V components is not running".

Holight commented 2 years ago

is virtual machine platform enabled?

Yes, it is enabled.

zausenecz commented 2 years ago

try to create any virtual machine via hyper-v

Creating any virtual machine via Hyper-V also fails, with error "The Virtual Machine Management Service failed to start the virtual machine 'New Virtual Machine' because one of the Hyper-V components is not running".

bro i have literally the same problem and also don't know how to fix that. are u using win11 or 10? did u do some kind of system optimizations?

Holight commented 2 years ago

try to create any virtual machine via hyper-v

Creating any virtual machine via Hyper-V also fails, with error "The Virtual Machine Management Service failed to start the virtual machine 'New Virtual Machine' because one of the Hyper-V components is not running".

bro i have literally the same problem and also don't know how to fix that. are u using win11 or 10? did u do some kind of system optimizations?

I am using win11, version 10.0.22000.282. I am not aware of any system optimizations.

zausenecz commented 2 years ago

try to create any virtual machine via hyper-v

Creating any virtual machine via Hyper-V also fails, with error "The Virtual Machine Management Service failed to start the virtual machine 'New Virtual Machine' because one of the Hyper-V components is not running".

bro i have literally the same problem and also don't know how to fix that. are u using win11 or 10? did u do some kind of system optimizations?

I am using win11, version 10.0.22000.282. I am not aware of any system optimizations.

Hmm, interesting. I thought the reason was that I used to disable various unnecessary services, including through the registry, and the problem is that. but since you say that you didn’t do that, then I’m not sure anymore.

rickhenderson commented 2 years ago

I'm having similar problems, but not sure if our sysadmins have some sort of setting that is blocking it. All Virtual settings are turned on, I followed the command line commands for older versions of Windows, and triple checked my bios settings.

bferg317 commented 2 years ago

Make sure virtualization is enabled in BIOS firmware.

rickhenderson commented 2 years ago

Everyone suggests the items that are in the standard instructions. I had the exact same problem and today I found out it was related to Virtualization Based Security (VBS). Search Windows for "Core isolation" and activate "Memory Integrity".

zausenecz commented 2 years ago

Everyone suggests the items that are in the standard instructions. I had the exact same problem and today I found out it was related to Virtualization Based Security (VBS). Search Windows for "Core isolation" and activate "Memory Integrity".

interesting. this may be true, since I was updating Windows 11 over Windows 10, and therefore vbs should have remained off for me

zausenecz commented 2 years ago

Everyone suggests the items that are in the standard instructions. I had the exact same problem and today I found out it was related to Virtualization Based Security (VBS). Search Windows for "Core isolation" and activate "Memory Integrity".

Nah, still doesn't work

photos https://ibb.co/bH4Cm1Z https://ibb.co/c8BgXC7 https://ibb.co/HCXTqDQ https://ibb.co/j6sfxsh https://ibb.co/0JVjbwD
blixten85 commented 2 years ago

I also have this problem. WslRegisterDistribution failed with error: 0x80370102 wsl --install -d Ubuntu-20.04

I am running AMD Ryzen 5 3600 (has support for AVX, AVX2). With ROG STRIX B450-F GAMING. The feature SVM MODE is enabled.

Windows 11 64bit (upgraded from windows 10 64 bit) Swedish language pack installed. And everything is up to date (atleast via windows update and wsl --update)

zausenecz commented 2 years ago

@Holight @rickhenderson @blixten85 I solved the problem for myself. in the device manager in the system devices section, some devices associated with virtualization and hyper-v were turned off. I turned them on and ubuntu started working image image

blixten85 commented 2 years ago

@Holight @rickhenderson @blixten85 I solved the problem for myself. in the device manager in the system devices section, some devices associated with virtualization and hyper-v were turned off. I turned them on and ubuntu started working image image

Thanks for sharing! I solved my issue by turning on Hyper-V in windows feature section of the controll panel (under applications). It was not named Hyper-V though. It's a swedish transnaltion but it reads translated directly to english, "Windows-Hypervision platform and Platform for virtual computers).

It would be handy though if the operatingsystem itself could recognize the error and where the solution lies. After all, it's 2021 and this should have been mandatory for the past 25 years, in my holy opinion.

EDIT: The "Windows-Hypervision platform and Platform for virtual computers" are two diffrent settings. Forgot to clarify.

JayHull commented 2 years ago

Resolved for me by enabling in BIOS: Intel Virtualization and Intel VT-D

VasilyVP commented 2 years ago

For me this actions worked 1) settings -> search "device security" -> Core isolation -> turn on 2) Added Windows component: Virtual machine platform (settings/applications/additional components/other components) on Win11 or try Hyper-V on Win10

Drofzz commented 2 years ago

Everyone suggests the items that are in the standard instructions. I had the exact same problem and today I found out it was related to Virtualization Based Security (VBS). Search Windows for "Core isolation" and activate "Memory Integrity".

you are my personal hero, I've been trying to fix this problem for 8 hours straight, you are the first person actually fixing the problem!

Tikquuss commented 2 years ago

I had the same problem on windows 11. Then I uninstalled and re-installed following this tutorial and it worked. To follow it your OS build number must be higher than 22000 (Windows menu > about your PC > OS build), otherwise, you should follow this one instead.

fenixryan commented 2 years ago

Reg hack worked for me, thank you folks, been doing my head in for ages

Windows Registry Editor Version 5.00

; Created by: Shawn Brink ; Created on: April 11th 2018 ; Tutorial: https://www.tenforums.com/tutorials/104025-turn-off-core-isolation-memory-integrity-windows-10-a.html

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity] "Enabled"=dword:00000001

wmehanna commented 2 years ago

For me this actions worked

  1. settings -> search "device security" -> Core isolation -> turn on
  2. Added Windows component: Virtual machine platform (settings/applications/additional components/other components) on Win11 or try Hyper-V on Win10

I can't believe that actually worked for me! I lost hours on this. thank you

Usman-Jagatpuri commented 1 year ago

I am getting the same error for different reasons, Actually, I had ubuntu installed and it was working fine. I just forget the admin user password after many failed reset attempts, I decided to uninstall. Now when I am trying to reinstall I am getting the same error mentioned in the thread title. I tried all Solutions mentioned above and still can't be able to proceed with the installation. Bios checked: Hyper V Enabled and Core Isolation checked. image

jeffsdata commented 1 year ago

Everyone suggests the items that are in the standard instructions. I had the exact same problem and today I found out it was related to Virtualization Based Security (VBS). Search Windows for "Core isolation" and activate "Memory Integrity".

This didn't work for me, but for some reason the future kept turning off when I restarted...

riveruniversity commented 1 year ago

It worked for me when I set both "Enabled" values to 1: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\KernelShadowStacks Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity

FitryyrtiF commented 1 year ago

Okay so I've tried few tips from here on how to resolve the problem. I've got this issue "please enable the virtual machine platform windows feature and ensure virtualization is enabled in the bios ".

Let me guide you the steps that I've done.

  1. Open "windows feature", activate "Windows Subsytem for Linux" --> will need to restart pc.
  2. Install Ubuntu from this link https://ubuntu.com/wsl.
  3. Open the Ubuntu and it will give the link to update wsl. Open the link.
  4. After finished installing/updating, open the Ubuntu and it will show this problem "please enable the virtual machine platform windows feature and ensure virtualization is enabled in the bios " (even though your system already enabled both).
  5. Search for Windows for "Core isolation" and activate "Memory Integrity". If cannot turn on, then open this link "https://www.windowsdigitals.com/memory-integrity-cant-be-turned-on-windows-11/". --> will need to restart pc.
  6. After that, Open "windows feature", activate "Windows Hypervisor Platform" & "Virtual Machine Platform". --> will need to restart pc.
  7. Open Ubuntu and it should be running smoothly.
icest99 commented 7 months ago

I found a too simple solutions that somehow works.

So, If you already:

  1. enabled Virtualization on Bios and on Windows Features.
  2. enabled Windows Hypervisor Platform or Hyper-V
  3. enabled Windows Subsystem for Linux

just disable all of the above on Windows Features. Not BIOS. Then restart. now open the Windows Features and enabled all of these options again. Restart.

And now you can just wsl --install or wsl --install -d Ubuntu_of_your_choice and it should work. Also make sure you run the Terminal as Admin

Salvador-14 commented 3 months ago

Everyone suggests the items that are in the standard instructions. I had the exact same problem and today I found out it was related to Virtualization Based Security (VBS). Search Windows for "Core isolation" and activate "Memory Integrity".

Thanks mate, I was losing my fucking mind, no other resources, articles, forums mention this

TimothyKuijper commented 1 week ago

After a lot of research I have found out that on windows 11 home hyper-V is not available (available on: pro, enterprise and education editions) and Windows Hypervision Platform wont cut it,

luckily there is a workaround. This article shows that workaround and this is also the thing that ended up fixing the issue for me.

Not speaking to anyone in this thread specifically, just leaving this here in case this ends up helping someone