WSL: WSL2 fails to start with Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424

Windows Version

Microsoft Windows [Versión 10.0.22621.2428]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Try to start WSL from command line.

Expected Behavior

WSL starts and we have access to Linux shell.

Actual Behavior

WSL throws an error about not being able to setup the network and drops to PowerShell again:

PS C:\Users\rpedroche> wsl
No se pudo configurar la red (networkingMode Nat). Para deshabilitar las redes, establezca "wsl2.networkingMode=None" en C:\Users\rpedroche\.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424
PS C:\Users\rpedroche>

This happens since today’s update to 2.0.9.0.

Diagnostic Logs

WslLogs-2023-11-15_10-06-57.zip

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 50 (1 by maintainers)

Most upvoted comments

Hi, I’ve resolved with these steps:

I have only WSL, no vm no hyper-v machines and other virtualization tool. Take care of possible side effects or issues with the removal of hyper-v services

  1. removed Optional Features: Hyper-v platform and Hyper-V managment tool
  2. reboot
  3. start WSL: it will ask to install virtual platform service. confirm to install
  4. reboot
  5. wsl works

let me know if these steps also work for you.

Regards.

+1 after a Windows update

I just run “OptionalFeatures.exe” and then enabled “Virtual Machine Platform” and that’s it. No additional steps before or after.

Closed? Issue is still there…

您好,您的邮件我已收到,我会尽快给您回复,谢谢!

您好,您的邮件我已收到,我会尽快给您回复,谢谢!

您好,您的邮件我已收到,我会尽快给您回复,谢谢!

您好,您的邮件我已收到,我会尽快给您回复,谢谢!

The following steps were used to solve the problem with wsl Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424 on my Windows 11 after applying a windows update.

  • disable Hyper-V and reboot the system, you can do this by running the following command as administrator in powershell:
    Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
    
  • After the reboot try to start wsl normally, if it does not start it will most likely ask you to execute the command:
    wsl.exe --install --no-distribution
    
  • Reboot the system again and with this you could start wsl normally.

Greetings,

Same here. I see it after the computer got rebooted by WU for installing KB5032883, KB5032007 and KB5032190 (not sure which would be the relevant one here).

Problem is… I do use Hyper-V in this machine and I don’t feel comfortable just removing it. Is there any other suggestion?

This isn’t working for me on Windows 11. It started after I rebooted for updates.

  1. Hyper-V was NOT enabled, and best I know, it never was. I enabled it and rebooted and the problem persisted.
  2. I disabled Hyper-V and rebooted and the problem persisted.
  3. I ran wsl --install --no-distribution with Hyper-V disabled and it simply said the operation completed successfully without doing anything, best I could tell. I rebooted and the problem persisted.
  4. I disabled Virtual Machine Platform and rebooted. The OS indicated I needed to enable features for WSL to work, and it enabled VMP, and I rebooted. The problem persisted.
  5. Fully uninstalled WSL (best I could figure how), reinstalled, problem persisted.
  6. Played with Hyper-V and firewall settings as noted below, problem persisted.

Happy to provide logs and such if someone can tell me what they need and how to get it.

Thanks.

I just run “OptionalFeatures.exe” and then enabled “Virtual Machine Platform” and that’s it. No additional steps before or after.

This worked, nice job!

Hi, I’ve resolved with these steps: I have only WSL, no vm no hyper-v machines and other virtualization tool. Take care of possible side effects or issues with the removal of hyper-v services

  1. removed Optional Features: Hyper-v platform and Hyper-V managment tool
  2. reboot
  3. start WSL: it will ask to install virtual platform service. confirm to install
  4. reboot
  5. wsl works

let me know if these steps also work for you. Regards.

Worked for me too (step 3 specifically is in windows terminal: wsl.exe --install --no-distribution).

How did they manage to push this update in production and just forget about WSL2 users? 🤡 Breaking our systems to push half-baked features (the multi-desktop transition effect still needs a good polish).

您好,您的邮件我已收到,我会尽快给您回复,谢谢!

I manually re-enabled Virtual Machine platform and that un-bricked things after the Windows Update caused the above problem. Now WSL starts up but it now starts as root instead of my usual user, how bizarre 😄 (su myuser is a workaround for now).

Disable Hyper-V Enable the Virtual Machine. Reboot and problem solved. This means that WSL2 is not only not compatible with Hyper-V, but also conflicts with it.

Same here. I see it after the computer got rebooted by WU for installing KB5032883, KB5032007 and KB5032190 (not sure which would be the relevant one here).

Problem is… I do use Hyper-V in this machine and I don’t feel comfortable just removing it. Is there any other suggestion?

I also use Hyper-V. Enabling it again and a third reboot restore the Hyper-V virtual machines.

Fixed on Windows 11 with wsl2.networkingMode = mirrored in .wslconfig file. This have some disadvantages cause actually doesn’t solve the issue with virtual NAT networking creation but it can connect externally.

Same error but not resolved with above methods: Failed to configure network (networkingMode Nat). To disable networking, set wsl2.networkingMode=None in C:\Users\Vivek Bajaj.wslconfig Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_FILE_NOT_FOUND

您好,您的邮件我已收到,我会尽快给您回复,谢谢!

Oh, turns out mine was caused by #10764 actually, what is with windows update breaking so many things with wsl

does anyone else have two wsl services listed in services.msc after this issue? One that won’t start and apparently doesn’t exist.

The following steps were used to solve the problem with wsl Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424 on my Windows 11 after applying a windows update.

  • disable Hyper-V and reboot the system, you can do this by running the following command as administrator in powershell:
    Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
    
  • After the reboot try to start wsl normally, if it does not start it will most likely ask you to execute the command:
    wsl.exe --install --no-distribution
    
  • Reboot the system again and with this you could start wsl normally.

Greetings,

it works for me(On Win11)

Hi, I’ve resolved with these steps:

I have only WSL, no vm no hyper-v machines and other virtualization tool. Take care of possible side effects or issues with the removal of hyper-v services

  1. removed Optional Features: Hyper-v platform and Hyper-V managment tool
  2. reboot
  3. start WSL: it will ask to install virtual platform service. confirm to install
  4. reboot
  5. wsl works

let me know if these steps also work for you.

Regards.

Thank you Marco! You saved my day!

Hi, I’ve resolved with these steps:

I have only WSL, no vm no hyper-v machines and other virtualization tool. Take care of possible side effects or issues with the removal of hyper-v services

  1. removed Optional Features: Hyper-v platform and Hyper-V managment tool
  2. reboot
  3. start WSL: it will ask to install virtual platform service. confirm to install
  4. reboot
  5. wsl works

let me know if these steps also work for you.

Regards.

Hi, I’ve resolved with these steps:

I have only WSL, no vm no hyper-v machines and other virtualization tool. Take care of possible side effects or issues with the removal of hyper-v services

  1. removed Optional Features: Hyper-v platform and Hyper-V managment tool
  2. reboot
  3. start WSL: it will ask to install virtual platform service. confirm to install
  4. reboot
  5. wsl works

let me know if these steps also work for you.

Regards.

That helps me, Thanks.

Resetting Ubuntu back to default via wsl --setdefault Ubuntu in powershell solved the “default user is root” issue (despite Ubuntu being the only distro I have installed, god knows what screwed up the WSL config so badly in this update)

I’m a VirtualBox user so I couldn’t remove Hyper-V. But I found I didn’t have Virtual Machine or Hypervisor installed now and I can’t remember if they were. Once I check them off and rebooted, I could start Ubuntu without the network error message. However, it started in root. To fix this I issued the following in Admin Powershell: ubuntu config --default-user (your user id)

Hi, I’ve resolved with these steps:

I have only WSL, no vm no hyper-v machines and other virtualization tool. Take care of possible side effects or issues with the removal of hyper-v services

  1. removed Optional Features: Hyper-v platform and Hyper-V managment tool
  2. reboot
  3. start WSL: it will ask to install virtual platform service. confirm to install
  4. reboot
  5. wsl works

let me know if these steps also work for you.

Regards.

that helped

same issue, after windows update

image

image

Hi I’m an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

You can give me feedback by thumbs upping or thumbs downing this comment.