WSL: An error occurred during installation. Error Code: 0x80070422

Version Information

  • Windows version: Microsoft Windows [Version 10.0.22621.232] (Windows 11 Pro 64-bit)

  • WSL Version: 2

  • WSL Kernel Version: 5.10.16

  • What error did I get: An error occurred during installation. Error Code: 0x80070422

  • Distribution I’m trying to install: Ubuntu

  • Command line used: wsl --install -d Ubuntu

Description of this error

I’m trying to install an Ubuntu distro to WSL. My CPU is Core i8, has virtualization support enabled, and followed the manual installation instructions at: https://docs.microsoft.com/en-us/windows/wsl/install-manual

When I run the command wsl --install -d Ubuntu, I get the following error: An error occurred during installation. Distribution Name: 'Ubuntu' Error Code: 0x80070422

Soon after, a search took place and I learned that the disabled LxssManager service was causing this error (Link to article: https://github.com/Microsoft/WSL/issues/3815)

So I ran the following commands in order:

  • cmd.exe to enter Command Prompt
  • sc start LxssManager to start the LxssManager service

And this is what I get:

[SC] StartService FAILED 1056:

An instance of the service is already running.

It says the service is already running. And when I check in services.msc, it is indeed running. So I suspect that although the service is running, the WSL on my machine is not able to communicate with the service.

So I stopped the service, put it back to the DISABLED state, went into Windows Features to disable WSL, rebooted the machine, and turned WSL back on, then restarted the computer.

At this point, I tried running WSL, and it gave me error 0x80070422. This is understandable, since I’m leaving the LxssManager service in the DISABLED state.

Then I re-enable the service with the command: sc config LxssManager start=auto, and this is what I get:

C:\Users\Duy Thanh>sc config LxssManager start=auto
[SC] ChangeServiceConfig SUCCESS

C:\Users\Duy Thanh>

(Please note that I have disabled UAC on my computer, and run Windows Terminal as administrator. Windows Defender is also completely disabled using Group Policy and Registry, so there should be no conflict here)

I repeatedly run the following commands:

C:\Users\Duy Thanh>shutdown -r -t 00

And after reboot:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\Duy Thanh>cmd.exe
Microsoft Windows [Version 10.0.22621.232]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Duy Thanh>sc stop LxssManager

SERVICE_NAME: LxssManager
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 3  STOP_PENDING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

C:\Users\Duy Thanh>sc query LxssManager

SERVICE_NAME: LxssManager
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

C:\Users\Duy Thanh>sc start LxssManager

SERVICE_NAME: LxssManager
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 2  START_PENDING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x7d0
        PID                : 4152
        FLAGS              :

C:\Users\Duy Thanh>sc query LxssManager

SERVICE_NAME: LxssManager
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

C:\Users\Duy Thanh>

Now it’s time for me to install my distro, and I verify the service is running, via the above commands:

C:\Users\Duy Thanh>wsl --install -d Ubuntu
Installing: Ubuntu
An error occurred during installation. Distribution Name: 'Ubuntu' Error Code: 0x80070422

C:\Users\Duy Thanh>

Still the error persists, I try again with the command:

C:\Users\Duy Thanh>wsl --update
Installing: Windows Subsystem for Linux
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

C:\Users\Duy Thanh>

Something went wrong, I decided to check the service again:

C:\Users\Duy Thanh>sc query LxssManager

SERVICE_NAME: LxssManager
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

C:\Users\Duy Thanh>

I tried going back to PowerShell, but nothing worked (Because I was still in the Command Prompt):

C:\Users\Duy Thanh>exit
PS C:\Users\Duy Thanh> wsl --install -d Ubuntu
Installing: Ubuntu
An error occurred during installation. Distribution Name: 'Ubuntu' Error Code: 0x80070422
PS C:\Users\Duy Thanh> wsl --update
Installing: Windows Subsystem for Linux
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
PS C:\Users\Duy Thanh> cmd.exe
Microsoft Windows [Version 10.0.22621.232]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Duy Thanh>sc query LxssManager

SERVICE_NAME: LxssManager
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

C:\Users\Duy Thanh>

So what’s going on in the end? I appreciate any help

About this issue

Most upvoted comments

I occured similar problem when i wsl.exe --update in Powershell in Windows Terminal with same error code Wsl/UpdatePackage/0x80070422.

I found the reason: AppX Service is disabled by my self on my Windows 10 because of the high CPU usage.

After changing the Start type of Service AppXSvc from disable to automatic, everything become normal.

Hope it is helpful.

Same problem here!

I have a Windows Server 2022, I use techcommunity.microsoft and it says to update my Win server, enable WSL and install my desired distro:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
wsl --install

But after enable WLS and reboot I couldn’t install and had these errors:

wsl --install -d Ubuntu
Installing: Ubuntu
An error occurred during installation. Distribution Name: 'Ubuntu' Error Code: 0x8000ffff
wsl --install -d Ubuntu-20.04
Installing: Ubuntu 20.04 LTS
An error occurred during installation. Distribution Name: 'Ubuntu 20.04 LTS' Error Code: 0x8000ffff

I tried your comment wsl --update and now it start installing.

Screenshot_20230118_094117

Firstly, there is no such CPU as a Core i8, so I’m assuming you meant i9.

The Feature of WSL is not enabled.

Please search Features and open Turn Features On or Off.

Find WSL, and click enable.

Enable the Hyper-V service while your at it.

Reboot, then try the installation again, then get back to me once done.

@NickDeBeenAIE Thank you for helping me. Maybe due to a typo, I mistyped 9 into 8. Sorry for the confusion.

Hyper-V enabled, WSL feature enabled, I also tried disabling and enabling them in Windows Features but still no effect

What’s more, there are some additional details:

I manually installed Ubuntu using the Add-AppxPackage command via Powershell, all the setup went smoothly and the installation and setup for the first time ran without any errors.

Then I opened the Powershell command prompt (run as admin) and typed wsl, Ubuntu actually worked without any errors. Even all commands are perfectly executed in that Ubuntu WSL environment

However, statements where WSL takes arguments won’t work, such as wsl --install -d Ubuntu or wsl --update and any other WSL command that takes arguments, will both return error 0x80070422 (with the command wsl --install -d Ubuntu) and the error message: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (with the wsl --update command).

There is another version of WSL, the WSL Preview version available on the Microsoft Store. And since I’m in the Windows Insider program, I thought maybe the current WSL is not compatible so I installed the WSL Preview on the Store, but still the same error occurs. And when I remove WSL Preview and go to windows features turn off Hyper-V and WSL and turn it back on, the error persists.

But when I manually install the Ubuntu distribution using the Appx installation file, everything is back to normal as if nothing happened.

for me it was the wlidsvc (Microsoft Account Sign-in Assistant). microsoft wants you to have an account so badly

I had the same problem and running this in an elevated command prompt fixed the issue:

sc config wlidsvc start= demand

Potential new fix: I simply hadn’t had enabled Microsoft Store Install Service, perhaps this will help someone who needs fix next. I hadn’t seen this issue with services before, so I’m adding it here. Hope this helps someone.

In my case the problem was that I don’t have AppX installed. so when I run

wsl --install -d Ubuntu

I get

Error code: Wsl/InstallDistro/0x80070422

The workaround that helped: just use another way to download files that doesn’t require AppX.

wsl --install -d Ubuntu --web-download

Hope this helps someone.

you can also install wsl and a distro without wlidsvc service running:

https://github.com/microsoft/WSL/releases -> get for eg. Microsoft.WSL_1.2.5.0_x64_ARM64.msixbundle https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL -> get for eg. Fedora-Remix-for-WSL-SL_38.0.0.0_x64_arm64.msixbundle

you can also install distros without wlidsvc service using wsl manager https://github.com/bostrot/wsl2-distro-manager

check these required services running (able to run):

for me i was disabled all my windows updates when i enabled it again it’s works fine

I occured similar problem when i wsl.exe --update in Powershell in Windows Terminal with same error code Wsl/UpdatePackage/0x80070422.

I found the reason: AppX Service is disabled by my self on my Windows 10 because of the high CPU usage.

After changing the Start type of Service AppXSvc from disable to automatic, everything become normal.

Hope it is helpful.

This seems to be a very big problem with your operating system.

You’ll need to leave the Windows Insider Program as the builds can have a lot of issues, some of which will corrupt your installation.

It appears such issue has happened, wherein, the registry item to do with WSL has been screwed with.

This means 2 things:

Leave the Insider Program, and wait fpr your system to return to normal;

Or;

Reinstall your entire Windows installation.