skip to Main Content

Whenever I try to install any Linux distro on WSL I get this error:

WslRegisterDistribution failed with error: 0x80040324
Error: 0x80040324 (null)
Press any key to continue…

This is my setup:

Versione WSL: 0.67.6.0
Versione kernel: 5.15.62.1
Versione WSLg: 1.0.44
Versione MSRDC: 1.2.3401
Versione Direct3D: 1.606.4
Versione DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
versione Windows: 10.0.22621.521

The Ubuntu distro is not listed in the installed distro:

[wsl –list –all
Sottosistema Windows per Linux non ha distribuzioni installate.
Usare ‘wsl.exe –list –online’ per elencare le distribuzioni disponibili e ‘wsl.exe –install ‘ per l’installazione.
È anche possibile installare le distribuzioni visitando il Microsoft Store: https://aka.ms/wslstore
Error code: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND3

Anyway if I try to install Ubuntu I get this message:

wsl –install -d Ubuntu
Ubuntu è già installato. (Ubuntu is alreday installed)
Avvio di Ubuntu in corso…

An then I get this message:

Installing, this may take a few minutes…
WslRegisterDistribution failed with error: 0x80040324
Error: 0x80040324 (null)
Press any key to continue…

and here it stops.

Hyper-V is installed without adding any virtual machine or virtual switch in the control panel.
enter image description here

Is someone having any clue?

Thank you for any help.

2

Answers


  1. Chosen as BEST ANSWER

    Solved!

    I needed to uninstall WSL, Hyper-V and the Hypervisor platform from Windows Programs & Features, reboot, reinstall everything and then apply the updates from Windows Update.


  2. TLDR:

    Ensure that you don’t have .wslconfig and .wslgconfig already stored at C:/Users/{username} when you start WSL for the first time.

    More Detail:

    I had .wslconfig and .wslgconfig already stored at C:/Users/{username} because I re-installed Windows with "Keep files only" setting. So the files were kept at the same location after the installation. Seems like the initial WSL startup was affected by those configs. As soon as I removed them, distro installation was successful without any reboot required.

    .wslconfig (at the time of installing WSL):

    [wsl2]
    networkingMode = bridged
    vmSwitch = WSL Bridge
    ipv6 = true
    dhcp = false
    kernelCommandLine = sysctl.net.ipv6.conf.default.autoconf=0
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search