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

Failed to install linux distro with error 0x8007023e #5508

Open
mabusaa opened this issue Jun 29, 2020 · 40 comments
Open

Failed to install linux distro with error 0x8007023e #5508

mabusaa opened this issue Jun 29, 2020 · 40 comments
Labels
failure-to-launch failure to launch

Comments

@mabusaa
Copy link

mabusaa commented Jun 29, 2020

Environment

Windows build number: 10.0.19041.0
Your Distribution version: NA
Whether the issue is on WSL 2 and/or WSL 1: WSL 2

Steps to reproduce

I follow the docs to activate wsl 2 , then I am trying to install Linux distro , but failed with below error

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007023e
Error: 0x8007023e {Application Error}
The exception s (0x

Expected behavior

Linux distro installed successfully.

Actual behavior

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007023e
Error: 0x8007023e {Application Error}
The exception s (0x

@therealkenc
Copy link
Collaborator

Probably #4103

@mabusaa
Copy link
Author

mabusaa commented Jun 30, 2020

Probably #4103

Tried the solution , It did not work.

fsutil behavior set disableencryption 1
fsutil behavior set disablecompression 1

@reedoso
Copy link

reedoso commented Jun 30, 2020

I have the same error too
I tried to fix it like #4103 but it doesn't work

@therealkenc
Copy link
Collaborator

Please collect detailed logs given the work-around over there didn't take.

@mabusaa
Copy link
Author

mabusaa commented Jun 30, 2020

Please collect detailed logs given the work-around over there didn't take.

Please check logs
logs.zip

@reedoso
Copy link

reedoso commented Jun 30, 2020

@mabusaa
I have reinstalled the windows 10 and now it works.
I suppose that error was because of unsuccessull updating to 2004

@mabusaa
Copy link
Author

mabusaa commented Jun 30, 2020

@mabusaa
I have reinstalled the windows 10 and now it works.
I suppose that error was because of unsuccessull updating to 2004

Not an option for me :(

@pronitdas
Copy link

Any updates on this??

tried couple of workarounds mentioned (decompression and reinstalling) does not seem to work now.

@mbijjur
Copy link

mbijjur commented Sep 3, 2020

Any update on this? In my case, I was able to successfully run the wsl2 Ubuntu for 3 days and then it started failing with the error code - 0x8007023e as below.
Tried all the workarounds related to this error but no luck. Cant reinstall Windows as well.
Tried reinstalling WSL completly but still its same issue

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007023e
Error: 0x8007023e {Application Error}
The exception s (0x
Press any key to continue...

@mabusaa
Copy link
Author

mabusaa commented Sep 3, 2020

Any update on this? In my case, I was able to successfully run the wsl2 Ubuntu for 3 days and then it started failing with the error code - 0x8007023e as below.
Tried all the workarounds related to this error but no luck. Cant reinstall Windows as well.
Tried reinstalling WSL completly but still its same issue

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007023e
Error: 0x8007023e {Application Error}
The exception s (0x
Press any key to continue...

I ended re-installing windows :( and then it worked

@codecalvin
Copy link

I met same problem, no workaround now.

@abtsalvado
Copy link

abtsalvado commented Sep 13, 2020

I am also facing this issue, no workaround. Any solutions?

image

At the same time this issue also affected my previous docker installations, and tried both with Docker Desktop 2.3.0.4 and Docker Desktop 2.0.0.3; but both returned different errors.

Docker Desktop 2.3.0.4 error:

System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\Beatriz Salvado\AppData\Local\Docker\wsl\distro: exit code: -1
 stdout: {Application Error}

The exception s (0x
 stderr: 
   at Docker.Core.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\WslCommand.cs:line 119
   at Docker.Engines.WSL2.WSL2Provisioning.<DeployDistroAsync>d__17.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 169
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__24.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 94
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92

Docker Desktop 2.0.0.3 error:

Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Generic failure 
at New-Switch, <No file>: line 121
at <ScriptBlock>, <No file>: line 411
   at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
   at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 92
   at Docker.Actions.<>c__DisplayClass19_0.<Start>b__0() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 74
   at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59

@EfveZombie
Copy link

I got rid of 0x8007023e by following steps

  1. Disable all VM-like options (wsl, docker, vm platform, hyperv ...) in Turn Windows features on or off
  2. Reboot
  3. Enable WSL and Virtual Machine Platform
  4. Reboot

@eo1989
Copy link

eo1989 commented Oct 9, 2020

I got rid of 0x8007023e by following steps

  1. Disable all VM-like options (wsl, docker, vm platform, hyperv ...) in Turn Windows features on or off
  2. Reboot
  3. Enable WSL and Virtual Machine Platform
  4. Reboot

Unfortunately this worked. Damnit.

@Myron-S
Copy link

Myron-S commented Nov 11, 2020

I got rid of 0x8007023e by following steps

1. Disable all VM-like options (wsl, docker, vm platform, hyperv ...) in `Turn Windows features on or off`

2. Reboot

3. Enable WSL and Virtual Machine Platform

4. Reboot

Thanks. I shall try this. a Windows reinstall is not an option for me.

@Myron-S
Copy link

Myron-S commented Dec 4, 2020

It didn't work. :-(

@Myron-S
Copy link

Myron-S commented Dec 4, 2020

Ok.... I have an older laptop what has Ubuntu operating under WSL2. It installed under WSL2. This is my older back-up laptop.
On my main laptop when I try to install Ubuntu under WSL2 I get the error shown in the first post. When I install Ubuntu under WSL1 and try change the version to WSL2, I get ...

C:\WINDOWS\system32>wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
{Application Error}
The exception s (0x

On my main laptop I have uninstalled all the virtual machine stuff and then reinstalled virtualisation components individually, restarting as required and running Windows Update after each restart.

What could I compare between the back-up laptop and my main laptop to see where the difference/discrepancies are?

@mononen
Copy link

mononen commented Dec 7, 2020

Same issue here. I have a laptop running wsl2 but my main desktop is not taking wsl2 at all. It was previously working but one day it mysteriously wouldn't launch my WSL2 distro (Ubuntu 18.04LTS) and was throwing the "RPC server unavailable error".
I unregistered that distro and installed 20.04LTS under wsl 1 and couldn't upgrade it to 2 (running into the RPC server error). Both the DNS cache and RPC server were running in all instances, but now I've gotten the "{Application Error}" after setting the DNS cache registry key to 1 (it was previously on 2).

@trextrader
Copy link

trextrader commented Dec 12, 2020

Likewise tried everything I could find online over the past 30 days, for wsl1 no issues, for wsl2, not the case, yes, d-loaded the wsl2 update also, yes, tried both manual dload of the .appx (THEN EXECUTE FROM POWERSHELL Add-AppxPackage .<distrofilename>.appx, and via msft store, both failed, yes, tried rolling back and uninstalling various updates, yes, tried going back to various other restore points, I TRIED EVERYTHING I COULD FIND ONLINE - MSFT WSL DEV TEAM PLEASE HELP THIS IS NOT GOING TO MAGICALLY FIX ITSELF - SOMETHING IS HOSED ON YOUR MSFT SIDE, IF YOU HAVE A BAND-AID UNTIL A MORE ROBUST SOLUTION, PLEASZE FEEL FREE TOENMLIGHTEN US WITH SUCH KNOWLEDGE...
Installing, this may take a few minutes...If you:
Case1: wsl --set-default-version 2
The following error occurs when launching any of the distros, in this case Kali:
WslRegisterDistribution failed with error: 0x8007023e
Error: 0x8007023e {Application Error}
The exception s (0x
Press any key to continue...
Then if one executes from Powershell:
Installing, this may take a few minutes...
Case2: wsl --set-default-version 1
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:
The latter of the two cases being the correct behavior. The only matching correct behavior being the statement:

Installing, this may take a few minutes...

I don't believe any of the fixes I have seen online actually work for whatever is happening now.

@EfveZombie Damnit, it did not work for me, but E for Effort! - Tried the shut off Virt and WSL in Win Features, reboot, re-enable, reboot again - not so much. Tried enabling [and disabling] various alleged juju tricks which apparently resolved issues for others such as state changes to services and also in gpedit, again, negative results.

Current sys info on my side:


OS Name Microsoft Windows 10 Pro for Workstations
Version 10.0.19042 Build 19042
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Type x64-based PC
Processor AMD Ryzen Threadripper 2970WX 24-Core Processor, 3000 Mhz, 24 Core(s), 48 Logical Processor(s)
BIOS Version/Date American Megatrends Inc. 2001, 7/31/2019
SMBIOS Version 3.0
Embedded Controller Version 255.255
BIOS Mode UEFI
BaseBoard Manufacturer ASUSTeK COMPUTER INC.
BaseBoard Product ROG ZENITH EXTREME
BaseBoard Version Rev 1.xx
Secure Boot State Off
Windows Directory C:\Windows
System Directory C:\Windows\system32
Boot Device \Device\HarddiskVolume10
Total Physical Memory 128 GB
Available Physical Memory 117 GB
Total Virtual Memory 226 GB
Available Virtual Memory 212 GB
Page File Space 97.7 GB
Page File C:\pagefile.sys
Kernel DMA Protection Off


Virtualization-based security Running
Virtualization-based security Required Security Properties
Virtualization-based security Available Security Properties Base Virtualization Support, UEFI Code Readonly
Virtualization-based security Services Configured
Virtualization-based security Services Running


MSFT's release notes version by version: https://docs.microsoft.com/en-us/windows/wsl/release-notes - in case it helps anyone else on here, it did not for me, but saw places where it has for others. Reinstallation of Windows 10 is not an option for me.
Vacuous online AHA moments for others, not so much the case for myself, such as the following:
https://answers.microsoft.com/en-us/windows/forum/apps_windows_10-winapps-appscat_tools/resolving-wslregisterdistribution-error-0x80370102/412cf42b-1424-444c-bb95-4aa2b5fe5eaf

Any logs I can send simply let me know the default path to such log files (e.g. C:\users\...) - happy to provide.

Any assistance is appreciated...perhaps an electromagnetic deflector shield in the event cosmic rays output by the Sun are causing such to occur?

/Zap

@Myron-S
Copy link

Myron-S commented Dec 12, 2020

I was investigating why this failed and messed up with my note taking as I fixed it without having to do all of this, but this does seem to work.

Try this. It's more in-depth ....

  • Make sure Virtualisation is enabled in BIOS.
  • Make sure the Windows Image and the OS are healthy. Follow these instructions for Windows 10: https://docs.microsoft.com/en-us/troubleshoot/windows-server/deployment/fix-windows-update-errors
  • Make a note/backup of ALL Hyper-V settings!
  • Remove all Virtual machine features. This being: Hyper-V, containers, Virtual Machine Platform, Windows Hypervisor Platform, Windows Sandbox and Windows Subsystem for Linux.
  • Reboot the computer!
  • Follow the manual WSL installation instructions provided by Microsoft as shown here: http://aka.ms/wslinstall
  • Reboot the computer!
  • Make sure that your Linux Distro converts to WSL2 if you want your Distro to operate under a full Linux Kernel.
  • There is no harm in invoking Windows Update at this point. I recommend you do.
  • Install the Windows Hypervisor Platform. (The likes of VMware and Virtual Box need it.)
  • No harm in rebooting the computer at this point.
  • No harm in invoking Windows Update at this point.
  • If you use it, install the Windows Sandbox feature and test it.
  • Finally install Hyper-V and put back all your required settings.

At this point everything, for me, started working.

I have noticed that on the completion of installing any of the virtualisation features, when invoking Windows Update then KB4592438 gets reapplied. If you wish, and maybe recommended, invoke Windows Update when you install a Windows Feature. That's what I did. Installed a feature, rebooted and invoked Window Update. (I think the only one where I didn't invoke Windows Update is when I installed the Windows Hypervisor Platform.)

@gyk6985432
Copy link

I was investigating why this failed and messed up with my note taking as I fixed it without having to do all of this, but this does sem to work work.

Try this. It's more in-depth ....

  • Make sure Virtualisation is enabled in BIOS.
  • Make sure the Windows Image and the OS are healthy. Follow these instructions for Windows 10: https://docs.microsoft.com/en-us/troubleshoot/windows-server/deployment/fix-windows-update-errors
  • Make a note/backup of ALL Hyper-V settings!
  • Remove all Virtual machine features. This being: Hyper-V, containers, Virtual Machine Platform, Windows Hypervisor Platform, Windows Sandbox and Windows Subsystem for Linux.
  • Reboot the computer!
  • Follow the manual WSL installation instructions provided by Microsoft as shown here: http://aka.ms/wslinstall
  • Reboot the computer!
  • Make sure that your Linux Distro converts to WSL2 if you want your Distro to operate under a full Linux Kernel.
  • There is no harm in invoking Windows Update at this point. I recommend you do.
  • Install the Windows Hypervisor Platform. (The likes of VMware and Virtual Box need it.)
  • No harm in rebooting the computer at this point.
  • No harm in invoking Windows Update at this point.
  • If you use it, install the Windows Sandbox feature and test it.
  • Finally install Hyper-V and put back all your required settings.

At this point everything, for me, started working.

I have noticed that on the completion of installing any of the virtualisation features, when invoking Windows Update then KB4592438 gets reapplied. If you wish, and maybe recommended, invoke Windows Update when you install a Windows Feature. That's what I did. Installed a feature, rebooted and invoked Window Update. (I think the only one where I didn't invoke Windows Update is when I installed the Windows Hypervisor Platform.)

Thank you so much, after two days this solved my problem finally

@trextrader
Copy link

@ Myron-S, much appreciated the detailed step by step instructuions I will go through it step by step and let you know if it worked! That would be amazing!!
@ gyk6985432 , Thanks for sharing your success with the approach proposed by Myron-S. Hoping I can replicate as same.

@WiggidyW
Copy link

WiggidyW commented Dec 31, 2020

For whom it may help, the privateinternetaccess desktop app was causing this issue for me.

@mononen
Copy link

mononen commented Jan 1, 2021

For whom it may help, the privateinternetaccess desktop app was causing this issue for me.

Hmmm. This might be the same for me. I found that I could get it to work by following @Myron-S 's instructions, except for re-enabling hypervisor platform. I'm not doing anything with Virtual Box or VMware so I didn't need it.
I will test the PIA desktop app later when I'm back on my machine.

@trextrader
Copy link

YESSSS!!!! Worked with one strange minor twist I did prior to doing your recipe, so, whether it affected the outcome being positive is uncertain, as its possible it could have worked without enrolling in the Insider program. I am going to de-enroll and hopefully it will stick as the preview build will probably be trashed and rolled back. FWIW after enrolling in the insider program so I could drop in a preview build, se if that would resolve it, still no dice. Applied the recipe above and voile! AWESOME work and thank you very much for your master chef recipe to our salvation and sanity! 👍🏼 Side note, installing win-kex for kali had a few little nits and easy to resolve and find plenty of solutions online all saying the same thing, stop the vncservice and kill kali first, before rebooting, then relaunch into kex (KALI UI) worked perfectly. Hope you all had a HNY and staying safe and healthy!

@mononen
Copy link

mononen commented Jan 6, 2021

For whom it may help, the privateinternetaccess desktop app was causing this issue for me.

Thought I'd update here. Confirming it is the PIA desktop app. When starting WSL for the first time after restart while connected to the VPN, it throws the RPC server unavailable. After disconnecting from the VPN, WSL launches and behaves normally, even after reconnecting.
My solution is that whenever I need to start WSL (or do apt-get update/upgrade) I disconnect from the VPN, let WSL do its thing, then reconnect.
I'd love to add WSL to the VPN bypass rules, however I can't find the executable that it's using to access the internet, I've already added my mintty terminal to them and I see no difference (external IP in WSL is still that of the VPN).

@mbijjur
Copy link

mbijjur commented Feb 2, 2021

I was investigating why this failed and messed up with my note taking as I fixed it without having to do all of this, but this does seem to work.

Try this. It's more in-depth ....

  • Make sure Virtualisation is enabled in BIOS.
  • Make sure the Windows Image and the OS are healthy. Follow these instructions for Windows 10: https://docs.microsoft.com/en-us/troubleshoot/windows-server/deployment/fix-windows-update-errors
  • Make a note/backup of ALL Hyper-V settings!
  • Remove all Virtual machine features. This being: Hyper-V, containers, Virtual Machine Platform, Windows Hypervisor Platform, Windows Sandbox and Windows Subsystem for Linux.
  • Reboot the computer!
  • Follow the manual WSL installation instructions provided by Microsoft as shown here: http://aka.ms/wslinstall
  • Reboot the computer!
  • Make sure that your Linux Distro converts to WSL2 if you want your Distro to operate under a full Linux Kernel.
  • There is no harm in invoking Windows Update at this point. I recommend you do.
  • Install the Windows Hypervisor Platform. (The likes of VMware and Virtual Box need it.)
  • No harm in rebooting the computer at this point.
  • No harm in invoking Windows Update at this point.
  • If you use it, install the Windows Sandbox feature and test it.
  • Finally install Hyper-V and put back all your required settings.

At this point everything, for me, started working.

I have noticed that on the completion of installing any of the virtualisation features, when invoking Windows Update then KB4592438 gets reapplied. If you wish, and maybe recommended, invoke Windows Update when you install a Windows Feature. That's what I did. Installed a feature, rebooted and invoked Window Update. (I think the only one where I didn't invoke Windows Update is when I installed the Windows Hypervisor Platform.)

This solution works perfectly. Thanks.

@Injected420
Copy link

Probably #4103

Tried the solution , It did not work.

fsutil behavior set disableencryption 1
fsutil behavior set disablecompression 1

This solution works for a different error. One that says the disk are sparse, If you are getting that error, uninstall the distros you have installed, copy the first command into Powershell, Enter, repeat with the second and restart your pc. Also, make sure you installed the WSL 2 kernel AND you ran wsl --set-default-version 2. To find out more help info on the WSL in general you can type Get-Help wsl into Powershell to get advanced options. GL!

@Injected420
Copy link

I got rid of 0x8007023e by following steps

  1. Disable all VM-like options (wsl, docker, vm platform, hyperv ...) in Turn Windows features on or off
  2. Reboot
  3. Enable WSL and Virtual Machine Platform
  4. Reboot

Worked. Oddly enough this is the second error I have had to fix. The first one was solved by the commands
fsutil behavior set disableencryption 1
fsutil behavior set disablecompression 1
Restart.
Then the WSL2 was running fine for a while (over a month). When I went to re-install Kali-Linux I got an error again which looked the same as the first one #4103 but it wasn't. I tried this fixed before finding this post, but I did not disable hyper-v so it didn't work. Once I did though, disable WSL, Virtual Machine Platform, Hyper-V (click the start button and type features), select Turn Windows features On/Off, uninstall any distros you have installed and any VM software like VirtualBox or VMWare, restart. Go back and turn on WSL, Virtual Machine Platform and Hyper-V, download the WSL 2 Kernel, (install windows terminal preview for better experience) from the Microsoft store install from the list on this site Microsoft WSL 2 . Open/Run a distro, hopefully no errors. If all is good make a username and password and close the window if you have install Windows Terminal. Run Win Terminal as Admin, there will be a + and dropdown menu. From the dropdown menu you can select any distro, including Powershell, CMD, Azure and others, and run them side by side (split-pane). Also in the dropdown menu are the settings, you must have a text editor that can handle JSON, like VSCode, Atom, Brackets, you can change the settings for each command line, give them backgrounds, fonts, colors, etc. Hold ALT then click the Setting buttons to open the Default settings from which you can copy commands and color palettes. Good Luck!

@jamruthsai
Copy link

jamruthsai commented Feb 11, 2021

I was investigating why this failed and messed up with my note taking as I fixed it without having to do all of this, but this does seem to work.

Try this. It's more in-depth ....

  • Make sure Virtualisation is enabled in BIOS.
  • Make sure the Windows Image and the OS are healthy. Follow these instructions for Windows 10: https://docs.microsoft.com/en-us/troubleshoot/windows-server/deployment/fix-windows-update-errors
  • Make a note/backup of ALL Hyper-V settings!
  • Remove all Virtual machine features. This being: Hyper-V, containers, Virtual Machine Platform, Windows Hypervisor Platform, Windows Sandbox and Windows Subsystem for Linux.
  • Reboot the computer!
  • Follow the manual WSL installation instructions provided by Microsoft as shown here: http://aka.ms/wslinstall
  • Reboot the computer!
  • Make sure that your Linux Distro converts to WSL2 if you want your Distro to operate under a full Linux Kernel.
  • There is no harm in invoking Windows Update at this point. I recommend you do.
  • Install the Windows Hypervisor Platform. (The likes of VMware and Virtual Box need it.)
  • No harm in rebooting the computer at this point.
  • No harm in invoking Windows Update at this point.
  • If you use it, install the Windows Sandbox feature and test it.
  • Finally install Hyper-V and put back all your required settings.

At this point everything, for me, started working.

I have noticed that on the completion of installing any of the virtualisation features, when invoking Windows Update then KB4592438 gets reapplied. If you wish, and maybe recommended, invoke Windows Update when you install a Windows Feature. That's what I did. Installed a feature, rebooted and invoked Window Update. (I think the only one where I didn't invoke Windows Update is when I installed the Windows Hypervisor Platform.)

Holy s*** it worked. I think the problem is with the virtual box. we can't install wsl2 after virtual box but vice versa is possible.

@craigloewen-msft
Copy link
Member

Linking to logs from other issue: https://github.com/microsoft/WSL/files/5965131/wsl.etl.zip

@HessamLa
Copy link

HessamLa commented Nov 12, 2021

The only recipe that worked for me, and was extremely easy to apply was in this reddit reply

So basically, the root of the problem is with the DNS client service. If you have restart this service using regular tools such as services.msc, way to go. But in my case, the option was greyed out. As described in the link, I had to disable, restart, enable, restart.

Disable it first (in CMD)
reg add "HKLM\System\CurrentControlSet\Services\Dnscache" /v "Start" /t REG_DWORD /d "4" /f

Restart your computer and then enable it with the following
reg add "HKLM\System\CurrentControlSet\Services\Dnscache" /v "Start" /t REG_DWORD /d "2" /f

Restart your OS again. It should work.

One final thing to add, in case anyone finds any connection. About one or two weeks back I had opted into Windows Insider program. This problem emerged when my Windows 10 was updated about two or three days back.

@wahyupambudi
Copy link

wahyupambudi commented May 5, 2022

I got rid of 0x8007023e by following steps

1. Disable all VM-like options (wsl, docker, vm platform, hyperv ...) in `Turn Windows features on or off`

2. Reboot

3. Enable WSL and Virtual Machine Platform

4. Reboot

this method works, it may take a while to restart.
Thanks, I didn't think of this 👍

@rajivranjansinghpolice
Copy link

I have been facing this issue on Windows 11. followed all the troubleshooting steps suggested here but none of them worked. MY specs are as follows:-

OS Name Microsoft Windows 11 Home Single Language
Version 10.0.22000 Build 22000
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Name D&^%$$&%&^%^
System Manufacturer Dell Inc.
System Model Inspiron 7570
System Type x64-based PC
Processor Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1992 Mhz, 4 Core(s), 8 Logical Processor(s)
BIOS Version/Date Dell Inc. 1.21.0, 18-10-2021
SMBIOS Version 3.0
Embedded Controller Version 255.255
BIOS Mode UEFI
BaseBoard Manufacturer Dell Inc.
BaseBoard Product 06K08K
BaseBoard Version A00
Platform Role Mobile
Secure Boot State On
PCR7 Configuration Elevation Required to View
Windows Directory C:\WINDOWS
System Directory C:\WINDOWS\system32
Boot Device \Device\HarddiskVolume3
Locale India
Hardware Abstraction Layer Version = "10.0.22000.778"
Total Physical Memory 15.8 GB
Available Physical Memory 9.76 GB
Total Virtual Memory 18.2 GB
Available Virtual Memory 11.5 GB
Page File Space 2.38 GB
Page File C:\pagefile.sys
Kernel DMA Protection Off
Virtualization-based security Running
Virtualization-based security Required Security Properties
Virtualization-based security Available Security Properties Base Virtualization Support, Secure Boot, DMA Protection, UEFI Code Readonly, SMM Security Mitigations 1.0, Mode Based Execution Control
Virtualization-based security Services Configured
Virtualization-based security Services Running
A hypervisor has been detected. Features required for Hyper-V will not be displayed.

After breaking my head on for hours, I tried the following solution at a hunch and it worked. I set the version of wsl to 1.
wsl --set-default-version 1

After above operation completed successfully,
wsl --install -d Ubuntu
command worked like a charm.

I don't know why it worked and why other solutions didn't. Others who stumble onto this page may also try this before you resort to more desperate measures.

Thanks,

@rajivranjansinghpolice
Copy link

rajivranjansinghpolice commented Oct 21, 2022

Further updates on the issue. After setting default version of wsl to 1 and installing Ubuntu and Debian successfully, I tried to convert wsl for both distributions to 2. But I got the same error. This time the error message shows its a problem with configuring networking by wsl vm.

PS C:\WINDOWS\system32> wsl --set-version Ubuntu 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion in progress, this may take a few minutes.
{Application Error} The exception %s (0x
Error code: Wsl/Service/CreateVm/ConfigureNetworking/0x8007023e

I should also add that I want to Linux GUI applications and have installed WSLg Preview version. Necesaary drivers for vGPU from Intel and Nvidia have been added as per instructions manual for WSLg.

Relevant information about my system is as follows:-

    `PS C:\WINDOWS\system32> .\systeminfo.exe`
    `Host Name:                 DESKT&$
    OS Name:                   Microsoft Windows 11 Home Single Language
    OS Version:                10.0.22000 N/A Build 22000
    OS Manufacturer:           Microsoft Corporation
    OS Configuration:          Standalone Workstation
    OS Build Type:             Multiprocessor Free
    Registered Owner:          N/A
    Registered Organization:   N/A
    Product ID:               &$
    Original Install Date:     16-10-2021, 01:10:27
    System Boot Time:          21-10-2022, 13:16:45
    System Manufacturer:       Dell Inc.
    System Model:              Inspiron 7570
    System Type:               x64-based PC
    Processor(s):              1 Processor(s) Installed.
                               [01]: Intel64 Family 6 Model 142 Stepping 10 GenuineIntel ~996 Mhz
    BIOS Version:              Dell Inc. 1.21.0, 18-10-2021
    Windows Directory:         C:\WINDOWS
    System Directory:          C:\WINDOWS\system32
    Boot Device:               \Device$$$@$@$
    System Locale:             00000
    Input Locale:              0000))))))
    Time Zone:                 (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
    Total Physical Memory:     16,217 MB
    Available Physical Memory: 10,905 MB
    Virtual Memory: Max Size:  18,649 MB
    Virtual Memory: Available: 12,817 MB
    Virtual Memory: In Use:    5,832 MB
    Page File Location(s):     C:\pagefile.sys
    Domain:                    WORKGROUP
    Logon Server:              \\D&%$$%$&
    Hotfix(s):                 5 Hotfix(s) Installed.
                               [01]: KB5017264
                               [02]: KB5004567
                               [03]: KB5012170
                               [04]: KB5018418
                               [05]: KB5017850
    Network Card(s):           5 NIC(s) Installed.
                               [01]: Intel(R) Dual Band Wireless-AC 7265
                                     Connection Name: Wi-Fi
                                     DHCP Enabled:    Yes
                                     DHCP Server:     192.168.1.1
                                     IP address(es)
                                     [01]: 192.168.1.119
                                     [02]: $*$@FER54TTD
                               [02]: Wintun Userspace Tunnel
                                     Connection Name: McAfee_VPN
                                     Status:          Hardware not present
                               [03]: Realtek PCIe GBE Family Controller
                                     Connection Name: Ethernet
                                     Status:          Media disconnected
                               [04]: TAP-Windows Adapter V9
                                     Connection Name: McAfee VPN
                                     Status:          Hardware not present
                               [05]: VirtualBox Host-Only Ethernet Adapter
                                     Connection Name: VirtualBox Host-Only Network
                                     Status:          Hardware not present
    Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed. `

PS C:\WINDOWS\system32> wsl -v

    `WSL version: 0.70.0.0
    Kernel version: 5.15.68.1
    WSLg version: 1.0.45
    MSRDC version: 1.2.3575
    Direct3D version: 1.606.4
    DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
    Windows version: 10.0.22000.1098`

Would really like a solution here.

@rajivranjansinghpolice
Copy link

I can see the maintainers have not even assigned anyone to work on this issue. What is the point of lengthy submissions and issue-raising if discussions remain idle for want fo response. Really expected better.

@PTAHume
Copy link

PTAHume commented Dec 15, 2022

After following @Myron-S solution I was still getting the error then I tried @rajivranjansinghpolice suggestion and finally it worked ...so many days and hours of my life were lost on this thank you for the fix nothing else on line worked

@nvenhuizen14
Copy link

I had the same issue and went through all steps listed here with no changes. Right before i was going to reinstall windows i rememberd i hadn't installed Restoro on this computer yet. It works by scanning and replacing courrupted/deleted files in windows. So quick install, run and restart with Restoro and everthing is back to normal for me. Although i did use the paid version the free version should be able to do the same thing for anyone interested. I'm not affiliated with Restoro in anyway just think it could help some of the people dealing with this issue. It was 3 days of beating my head agaisnt the wall before this so i understand everyones pain! Good Luck! :)

@Ljtyxhc
Copy link

Ljtyxhc commented Dec 2, 2023

however, most of these methos don't work after restart PC times
i believed it may caused by network config or virtualbox setting (i change netsetting and delete some documents about virtual box)
it finally worked after change wsl 2 to wsl 1, i don't known why

@Ljtyxhc
Copy link

Ljtyxhc commented Dec 2, 2023

however, most of these methos don't work after restart PC times i believed it may caused by network config or virtualbox setting (i change netsetting and delete some documents about virtual box) it finally worked after change wsl 2 to wsl 1, i don't known why

the most interseting is that: after i change wsl vertion back (version 2) it worked too!!!

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

No branches or pull requests