WSL icon indicating copy to clipboard operation
WSL copied to clipboard

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

Open raulpedroche opened this issue 3 years ago • 51 comments

Windows Version

Microsoft Windows [Versión 10.0.22621.2428]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • [X] 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

raulpedroche avatar Nov 15 '23 09:11 raulpedroche

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.

github-actions[bot] avatar Nov 15 '23 09:11 github-actions[bot]

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.

marcomezzaro avatar Nov 15 '23 13:11 marcomezzaro

same issue, after windows update

image

image

ghost avatar Nov 15 '23 15:11 ghost

+1 after a Windows update

craigemery avatar Nov 15 '23 16:11 craigemery

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

karpikpl avatar Nov 15 '23 17:11 karpikpl

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.

It has fixed the problem for me too.

raulpedroche avatar Nov 15 '23 17:11 raulpedroche

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?

TheJCAB avatar Nov 15 '23 17:11 TheJCAB

Closed? Issue is still there..

ondrejbima avatar Nov 15 '23 17:11 ondrejbima

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.

raulpedroche avatar Nov 15 '23 17:11 raulpedroche

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.

hatuhay avatar Nov 15 '23 21:11 hatuhay

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)

CyberSpock avatar Nov 15 '23 23:11 CyberSpock

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 :D (su myuser is a workaround for now).

Foritus avatar Nov 16 '23 01:11 Foritus

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)

Foritus avatar Nov 16 '23 01:11 Foritus

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 :D (su myuser is a workaround for now).

This worked for me. No apparent side-effects on existing VMs. No reboot needed.

I too had the default user as root. I had to use <dist>.exe config --default-user <user> to reset it.

rcarde avatar Nov 16 '23 01:11 rcarde

Now WSL starts up but it now starts as root instead of my usual user, how bizarre :D (su myuser is a workaround for now).

To fix this I issued the following in Admin Powershell: ubuntu config --default-user (your user id)

CyberSpock avatar Nov 16 '23 01:11 CyberSpock

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.

juliwang0205 avatar Nov 16 '23 03:11 juliwang0205

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!

michaltorun avatar Nov 16 '23 11:11 michaltorun

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).

MaxDesignFR avatar Nov 16 '23 14:11 MaxDesignFR

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 :D (su myuser is a workaround for now).

This worked for me without the user issue.

westerguard avatar Nov 17 '23 06:11 westerguard

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.

appreciated!It works for me and helps me a lot.

kakadeguaidao avatar Nov 17 '23 15:11 kakadeguaidao