skip to Main Content

I encountered an error starting WSL with Ubuntu 22.04.3 LTS (GNU/Linux 5.15.133.1-microsoft-standard-WSL2 x86_64)

Detais:

Falha ao configurar a rede (networkingMode Nat). Para desabilitar a rede, defina ‘wsl2.networkingMode=None’ no C:Usersusuario.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424

I’ve successfully resolved this issue and wanted to share the solution for anyone who might face a similar problem.

Solution:

  1. remove Optional Features: Hyper-v platform and Hyper-V managment tool
  2. reboot
  3. start WSL: terminal: wsl.exe –install –no-distribution
  4. reboot

Source: https://github.com/microsoft/WSL/issues/10755

If anyone has experienced this error or has additional insights, feel free to share your thoughts!

2

Answers


  1. Found an easier solution from https://github.com/microsoft/WSL/issues/10495:

    • Enable "Virtual Machine Platform" on Windows features and restart.

    Select Start, enter Windows features, and select Turn Windows features on or off from the list of results.
    In the Windows Features window that just opened, find Virtual Machine Platform and select it.
    Select OK. You might need to restart your PC.

    Login or Signup to reply.
  2. A potential workaround is to use bridged mode (if acceptable). It took only few minutes.

    Created a new virtual switch using Hyper-V Manager -> Virtual Switch Manager (see below few steps) + make a small change to .wslconfig

    change: c:users<USER>.wslconfig to include 2 more lines:

    [wsl2]  # omit that if you already have it. 
    networkingMode=bridged
    vmSwitch=wsl_switch
    

    Create New Virtual Switch: Choose the type of virtual switch you need ( ‘External’) and click on ‘Create Virtual Switch’.

    Configure the Virtual Switch:
    Name your virtual switch (in my case I named it "wsl_switch" see above)
    If you chose an external switch, select the network adapter (NIC) you want to use.

    There will be a prompt warning about network connectivity disruption. Click ‘Yes’ if you agree to proceed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search