Aller au contenu
tricknfixGAMING · TECHNOLOGIE · INFORMATIQUE
Créer
Share
Share this topic

PC CONFORT · ENGLISH VERSION

Error 0x80370102 when installing WSL 2 on Windows 11: virtualization and solutions

English translation of the original French post. Code, commands, paths and error codes keep their original meaning. Replies and moderation are shared in the original discussion.

The Windows Subsystem for Linux (WSL) lets you use a Linux distribution such as Ubuntu directly in Windows. With WSL 2, the distribution runs in a lightweight virtual machine. If a virtualization component is missing, the installation or the first launch stops with error 0x80370102, which Microsoft documents as: "The virtual machine could not be started because a required feature is not installed."

Problem

  • wsl --install or the first Ubuntu launch shows error 0x80370102.
  • The message mentions a virtual machine that cannot start or a required feature that is not installed.
  • The distribution remains unusable even though the installation seemed complete.
  • The PC is itself a virtual machine (Hyper-V) and WSL 2 refuses to start inside it.

What to know before acting

  • The three causes cited by Microsoft: the Virtual Machine Platform Windows feature is not enabled, virtualization is disabled in the BIOS/UEFI, or the hypervisor launch is disabled in the boot configuration.
  • Required hardware: WSL 2 requires a CPU that supports SLAT (Second Level Address Translation), introduced with Intel Nehalem (1st generation Core) and AMD Opteron processors. Microsoft specifies that an older CPU such as a Core 2 Duo will not be able to run WSL 2, even if the Virtual Machine Platform installs successfully.
  • Windows version: wsl --install works on Windows 11 and on Windows 10 version 2004 or later (build 19041 and higher).
  • Administrator rights: the commands in this guide are run in PowerShell opened as administrator.

Step 1: check that the CPU and BIOS are ready

When to use it: always first, before changing anything.

Suggested solution

  1. Open PowerShell or a command prompt.
  2. Run the command below, then scroll down to the Hyper-V Requirements section.
Batch3 lines

systeminfo.exe

Expected result: according to Microsoft, if every line in this section reads Yes, the hardware is suitable. If the section states that a hypervisor has been detected, a hypervisor is already running: virtualization is therefore active, so go to step 3.

When to stop: if the Second Level Address Translation line reads No, the CPU does not support WSL 2. Do not change anything else: WSL 2 will not work on this PC.

Step 2: enable virtualization in the BIOS/UEFI

When to use it: step 1 shows No for virtualization enabled in firmware.

Suggested solution

  1. Preferably open this page on another device, as Microsoft recommends.
  2. Go to Settings > System > Recovery, then next to Advanced startup, select Restart now.
  3. Select Troubleshoot > Advanced options > UEFI Firmware Settings > Restart.
  4. In the UEFI, enable the CPU virtualization option (often called Intel VT-x, Intel Virtualization Technology, AMD-V or SVM depending on the manufacturer), save and exit.

Expected result: after restarting, the matching systeminfo.exe line changes to Yes.

When to stop: Microsoft insists on changing only what you need to in the UEFI: other settings might prevent Windows from starting. If you cannot find the option, follow the documentation from your PC or motherboard manufacturer (Microsoft links to Acer, Asus, Dell, HP and Lenovo). On Surface devices, virtualization is already enabled.

Rollback: the option is disabled the same way in the UEFI.

Step 3: turn on the Virtual Machine Platform

When to use it: virtualization is active, but error 0x80370102 persists. This is notably the case if WSL was installed manually before wsl --install was available, or after an upgrade from Windows 10 to Windows 11.

Suggested solution

  1. Open the Start menu, type Windows features and select Turn Windows features on or off.
  2. Check Virtual Machine Platform, then OK.
  3. Restart the PC: Microsoft reminds you that a restart is required after enabling it.

You can also enable this component from an administrator PowerShell, with the command given by Microsoft:

PowerShell3 lines

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Expected result: after restarting, the distribution starts without error.

Rollback: uncheck Virtual Machine Platform in the same window and restart.

Step 4: check the hypervisor launch

When to use it: virtualization and the Virtual Machine Platform are enabled, and the error continues.

Suggested solution

  1. Open PowerShell as administrator.
  2. Run the check command below.
  3. If the line shows hypervisorlaunchtype Off, the hypervisor is disabled: run the enable command, then restart.
PowerShell4 lines

bcdedit /enum | findstr -i hypervisorlaunchtype
bcdedit /set hypervisorlaunchtype Auto

Expected result: the check shows Auto and WSL 2 starts.

When to stop: if the line already shows Auto, do not run the second command and go to the special cases.

Rollback: if the value was Off before you changed it (for example for older virtualization software), it can be set back with bcdedit /set hypervisorlaunchtype Off followed by a restart. WSL 2 will then no longer work.

Step 5: finish installing the distribution

When to use it: the previous steps are done and you want to check or restart the installation.

Suggested solution

  1. List the installed distributions and their WSL version.
  2. If the distribution is still on version 1, switch it to version 2 (replace <Distro> with its name, for example Ubuntu).
  3. If the installation hangs at 0.0%, Microsoft advises downloading the distribution first with the --web-download option.
PowerShell5 lines

wsl.exe --list --verbose
wsl --set-version <Distro> 2
wsl --install --web-download -d <Distro>

Expected result: the VERSION column shows 2 and the distribution opens.

Special cases

SituationWhat Microsoft states
WSL 2 inside a Hyper-V virtual machineEnable nested virtualization on the host in an administrator PowerShell: Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true (name shown in Hyper-V Manager).
VMware or VirtualBox installedUse a version that supports Hyper-V (VMware 15.5.5 or later, VirtualBox 6 or later) or turn this software off.
Azure virtual machineNested virtualization is not supported with Trusted Launch: check that this option is disabled.
Error 0x8007019eThe WSL optional component is not enabled: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux, then restart.
Error 0x80070003Distributions must be stored on the system drive (C:). On Windows 11: Settings > System > Storage > Advanced storage settings > Where new content is saved.

Final check

  • ☐ systeminfo.exe shows Yes throughout the Hyper-V section, or that a hypervisor has been detected.
  • ☐ Virtual Machine Platform is checked and the PC has restarted.
  • ☐ bcdedit /enum | findstr -i hypervisorlaunchtype shows Auto.
  • ☐ wsl.exe --list --verbose shows version 2 and the distribution starts.

Sources

Still having the problem?

Reply with your Windows version (Settings > System > About), your CPU model, the Hyper-V section of systeminfo.exe, the output of bcdedit /enum | findstr -i hypervisorlaunchtype and the full error message. Remove your PC name and user name from screenshots before posting them.

Continue the discussion

The replies are available in the original French thread. They have not been translated.

Read the discussion