Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 0x80004005 when trying to register Kali Linux #10424

Closed
1 of 2 tasks
ebrocoli opened this issue Aug 26, 2023 · 58 comments
Closed
1 of 2 tasks

Error 0x80004005 when trying to register Kali Linux #10424

ebrocoli opened this issue Aug 26, 2023 · 58 comments

Comments

@ebrocoli
Copy link

Windows Version

Version 10.0.22000.2295

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.10.16

Distro Version

Kali Linux

Other Software

No response

Repro Steps

I was enabling WSL with the steps that Microsoft already listed
Then i tried to install Kali Linux, which the installation is succesfull
But when i typed kali it started to show Installing, this may take a few minutes...
And then the error happened, but this only happens with Kali and not other distros
I tried Ubuntu and Debian which worked fine so far

Expected Behavior

Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username:

Actual Behavior

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Diagnostic Logs

No response

@ebrocoli ebrocoli closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2023
@TuanDung0902
Copy link

I have same problem with Kali Linux, but I found a solution is installing WSL from Microsoft Store.

@Lopez017
Copy link

Lopez017 commented Sep 2, 2023

can you post a link to which WSL you used from the Microsoft store?

@TuanDung0902
Copy link

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

@Gabistakk
Copy link

im also having this issue, with kali linux.
tried all the fixes online but none works.

@TuanDung0902
Copy link

im also having this issue, with kali linux.
tried all the fixes online but none works.

Have you try to install WSL from MS Store?

@Gabistakk
Copy link

Gabistakk commented Sep 3, 2023

yeah it worked thank you so much!
for others what i did was (after installing WSL from MS store):
in the windows power shell: "wsl.exe --list --online"
it returns a list of the distros avaible.
then 'wsl.exe --install (distro name)'

@TuanDung0902
Copy link

TuanDung0902 commented Sep 3, 2023

yeah it worked thank you so much!
for others what i did was (after installing WSL from MS store):
in the windows power shell: "wsl.exe --list --online"
it returns a list of the distros avaible.
then 'wsl.exe --install (distro name)'

No problem I glad to help you!

@nateesh
Copy link

nateesh commented Sep 7, 2023

for me wsl --update and also setting LxssManager to automatic (via services or regedit) worked.

@id-widi
Copy link

id-widi commented Sep 13, 2023

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

i tried to install kali linux as you methode but don't work with me.

wsl --install -d kali-linux

but after few second show same problem, error "WslRegisterDistribution failed with error: 0x80004005"

what i do for solving this problem is editing registry lxssManager to value 2, manual install with powershell, and direct install from microsoft store.

oh btw i use windows 11.

@ihynar
Copy link

ihynar commented Sep 21, 2023

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

i tried to install kali linux as you methode but don't work with me.

wsl --install -d kali-linux

but after few second show same problem, error "WslRegisterDistribution failed with error: 0x80004005"

what i do for solving this problem is editing registry lxssManager to value 2, manual install with powershell, and direct install from microsoft store.

oh btw i use windows 11.

first use wsl.exe --update

@Junior-Programming
Copy link

wsl --update
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.

wsl --install -d kali-linux
Installing: Kali Linux Rolling
Kali Linux Rolling has been installed.
Launching Kali Linux Rolling...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80004005
Error: 0x80004005 Unspecified error

Press any key to continue...

i keep getting error

@happy-riosky
Copy link

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.

wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

i keep getting error

Did you try to edit registry lxssManager to value 2?
What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

@alkebe
Copy link

alkebe commented Sep 29, 2023

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.
wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error
Press any key to continue...
i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

This worked for me also.
Thanks

@nshettys
Copy link

nshettys commented Oct 1, 2023

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.
wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error
Press any key to continue...
i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

Thanks a ton!!! This worked for me. Thanks again

@ShabbirMehdi110
Copy link

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

tha

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

thanks it works

@veelorn
Copy link

veelorn commented Oct 13, 2023

Windows Version

Version 10.0.22000.2295

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.10.16

Distro Version

Kali Linux

Other Software

No response

Repro Steps

I was enabling WSL with the steps that Microsoft already listed Then i tried to install Kali Linux, which the installation is succesfull But when i typed kali it started to show Installing, this may take a few minutes... And then the error happened, but this only happens with Kali and not other distros I tried Ubuntu and Debian which worked fine so far

Expected Behavior

Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username:

Actual Behavior

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Diagnostic Logs

No response

Hi, I try "wsl --update" and then "wsl --install -d (distribution)" Its worked for me

@Yaser-Ebrahimi
Copy link

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.
wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error
Press any key to continue...
i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

This worked for me also.
Thanks

@Yanis0alpha
Copy link

pour mi toujour pas

PS C:\Windows\system32> wsl --update
Installation en cours : Sous-système Windows pour Linux
Sous-système Windows pour Linux a été installé.
PS C:\Windows\system32> kali
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80072746
Error: 0x80072746 Une connexion existante a d¹ Ûtre fermÚe par l?h¶te distant.

Press any key to continue...
PS C:\Windows\system32>

@permadistudio
Copy link

semua tips yang anda berikan tidak berhasil untuk saya, entah apa yang terjadi, saya tidak tahu

@Pinto-Katende-Jonathan
Copy link

Pinto-Katende-Jonathan commented Nov 13, 2023

  1. Make sure to use Powershell (as adminstrator) instead of cmd
  2. Type these two commands :
    • dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    • dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all
  3. Download and install the WSL 2 Linux Kernel from here: aka.ms/wsl2kernel
  4. Restart
  5. Open again Powershell
  6. Type : wsl --set-default-version 2
  7. Install KALI : wsl --install --distribution kali-linux

@dhruvsharma1904
Copy link

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.
wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error
Press any key to continue...
i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

thanks a lot dude!

@isaga7
Copy link

isaga7 commented Jan 4, 2024

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.
wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error
Press any key to continue...
i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

help me it didnt work for me, still says error

@Pinto-Katende-Jonathan
Copy link

Pinto-Katende-Jonathan commented Jan 7, 2024

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.
wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error
Press any key to continue...
i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

help me it didnt work for me, still says error

Make sure to unregistered your old kali (or uninstall it), and follow these steps : #10424 (comment)

( Unregistration

wsl --unregister <DistributionName>

Replace <DistributionName> with the name of the distribution you want to unregister. For example, if you want to unregister the "Ubuntu" distribution, the command would be:

@stasbalazuk
Copy link

win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
run powershell in administrator mode -> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Wait for the PC to reboot and check if it works.

@wdscxsj
Copy link

wdscxsj commented Mar 13, 2024

WSL 2.1.5.0 fails to install Kali Linux directly as WSL1 on two of my computers with WslRegisterDistribution failed with error: 0x80004005, one Windows 10 and another Windows 11.

The only workaround I can find is to first run wsl --set-default-version 2 and then install Kali Linux. (The installed version is 2024.1.) After that, it can be converted to WSL1 with wsl --set-version kali-linux 1, or exported to a different location, etc.

@MuhammetSonmez
Copy link

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

I've tried every possible way to solve the problem for the past few hours, and this worked for me, thank you :)

@afifafifafifafifali
Copy link

this worked for me too

@javidmajidov2023
Copy link

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

THANK YOUUUUU BROOOO THANKSSSZSS TYSMMMMMMMMMMMMM

@d0lla646
Copy link

I have same problem with Kali Linux, but I found a solution is installing WSL from Microsoft Store.

Thx

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

thx bld

@LenTrex28
Copy link

wsl --update Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed.
wsl --install -d kali-linux Installing: Kali Linux Rolling Kali Linux Rolling has been installed. Launching Kali Linux Rolling... Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error
Press any key to continue...
i keep getting error

Did you try to edit registry lxssManager to value 2? What I did:

  1. win + R -> regedit -> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager -> click the start option -> edit the value to 2
  2. run powershell in administrator mode -> wsl --update
  3. kali
  4. then it worked!

help me it didnt work for me, still says error

Make sure to unregistered your old kali (or uninstall it), and follow these steps : #10424 (comment)

( Unregistration

wsl --unregister <DistributionName>

Replace <DistributionName> with the name of the distribution you want to unregister. For example, if you want to unregister the "Ubuntu" distribution, the command would be:

still just isnt working

@bae-mars
Copy link

bae-mars commented Apr 4, 2024

I actually took my 2nd laptop and installed kali without any error :)

@YigitOzdemir34
Copy link

  1. Make sure to use Powershell (as adminstrator) instead of cmd

  2. Type these two commands :

    • dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    • dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all
  3. Download and install the WSL 2 Linux Kernel from here: aka.ms/wsl2kernel

  4. Restart

  5. Open again Powershell

  6. Type : wsl --set-default-version 2

  7. Install KALI : wsl --install --distribution kali-linux

Thank you. İt Works!!

@nomore1007
Copy link

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

Thank you for the link. I tried to search for it in the store, but it was not to be found. This link brought me right to it.

@github-actions github-actions bot mentioned this issue May 30, 2024
2 tasks
@TheMrM
Copy link

TheMrM commented Jun 24, 2024

for me wsl --update and also setting LxssManager to automatic (via services or regedit) worked.

This worked for me as well.

@piaono3
Copy link

piaono3 commented Jun 30, 2024

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

Thank so much bro. It worked

@UsamaMo
Copy link

UsamaMo commented Jul 9, 2024

Thank you so much everyone!

@MishanGhimire
Copy link

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80004005
Error: 0x80004005 Unspecified error

Press any key to continue...

@MishanGhimire
Copy link

Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80004005 Error: 0x80004005 Unspecified error

Press any key to continue...

I used this too wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.
PS C:\Windows\system32> wsl --install --distribution kali-linux
Kali Linux Rolling is already installed.
Launching Kali Linux Rolling...
PS C:\Windows\system32>

@MR-LeonardoGomes
Copy link

Friend you just need to install " wsl --set-default-version 2 "

https://learn.microsoft.com/pt-br/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

@MishanGhimire
Copy link

Friend you just need to install " wsl --set-default-version 2 "

https://learn.microsoft.com/pt-br/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
still got error saying Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80004005
Error: 0x80004005 Unspecified error

Press any key to continue...

@MishanGhimire
Copy link

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80004005
Error: 0x80004005 Unspecified error

Press any key to continue...

@1ambd4
Copy link

1ambd4 commented Jul 17, 2024

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

Works for me, thanks a lot.

@MR-LeonardoGomes
Copy link

bro cmd admin "wsl --set-default-version 2" Enter

@MishanGhimire
Copy link

bro cmd admin "wsl --set-default-version 2" Enter

not working still bro

@Pinto-Katende-Jonathan
Copy link

Pinto-Katende-Jonathan commented Jul 19, 2024

Use these commands in powershell with admin right

@tienphat2101
Copy link

yeah it worked thank you so much! for others what i did was (after installing WSL from MS store): in the windows power shell: "wsl.exe --list --online" it returns a list of the distros avaible. then 'wsl.exe --install (distro name)'

Thank you, it works for me now.

@l-urk
Copy link

l-urk commented Jul 23, 2024

  • In an admin PowerShell use: "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux"
    Then...
  • In an admin CMD window use: "wsl --update && wsl --install -d DISTRO-NAME"
    Replace DISTRO-NAME with your desired distribution.

@MishanGhimire
Copy link

  • In an admin PowerShell use: "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux"
    Then...
  • In an admin CMD window use: "wsl --update && wsl --install -d DISTRO-NAME"
    Replace DISTRO-NAME with your desired distribution.

Tried all of it still got this error
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8037010d
Error: 0x8037010d The virtual machine or container JSON document is invalid.

@l-urk
Copy link

l-urk commented Jul 28, 2024

  • In an admin PowerShell use: "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux"
    Then...
  • In an admin CMD window use: "wsl --update && wsl --install -d DISTRO-NAME"
    Replace DISTRO-NAME with your desired distribution.

Tried all of it still got this error Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x8037010d Error: 0x8037010d The virtual machine or container JSON document is invalid.

Check this one out #6317

@adisawant2005
Copy link

can you post a link to which WSL you used from the Microsoft store?

Search this in Microsoft Store "Windows Subsystem for Linux"

@l-urk
Copy link

l-urk commented Aug 8, 2024

WSL version: 2.2.4.0

@ErikPervious
Copy link

can you post a link to which WSL you used from the Microsoft store?

Here is the link: https://apps.microsoft.com/store/detail/windows-subsystem-for-linux/9P9TQF7MRM4R

This work for me in 22/08/24

@adisawant2005
Copy link

adisawant2005 commented Aug 22, 2024 via email

@l-urk
Copy link

l-urk commented Aug 22, 2024

it is the same.

@Makvagabo
Copy link

I am not positive that my experience can be helpful but I had the same trouble with installation and running of any distributive. I have been trying I think almost everything I could find on the internet. Unfortunately it worked nothing.
I went to extreme - Reset my PC. Yes, I have lost something, especially time, but finally WLS2 works properly without any movements.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests