WSL2 not working properly on Windows. Required to disable network.

cfort55 85 Reputation points
2024-02-12T19:13:40.7933333+00:00

Having issues with launching any linux distro within Windows.

For context it was working, and on Jan 29th it stopped working. There was a Powershell v7.3.11 update on windows but I don't believe it was working.

Currently I'm trying to launch WSL2 using Ubuntu-22.04 distro.

I get the following error:

Failed to configure network (networkingMode Nat). To disable networking, set `wsl2.networkingMode=None`

Disabling the network does make it work but I need to be able to connect online to use it. I tried tunneling as well it but to no success

I followed solutions from git and stack threads. Such as https://github.com/microsoft/WSL/issues/10709, https://github.com/microsoft/WSL/issues/10774, https://github.com/microsoft/WSL/issues/10709 https://zcusa.951200.xyz/en-us/troubleshoot/windows-client/application-management/virtualization-apps-not-work-with-hyper-v

I have VMP and Windows Subsystem for Linux enabled on Windows Features.

I've tried:

  1. Disabling Hyper-V from Windows Features on/off. Reboot. Launch distro, does not work. BUT I did notice that even if I disable Hyper-V and restart there is a lingering effect, making it partially enabled on start.
    1. First image is after disabling and reboot.
    2. User's image
  2. I attempted to disable from Powershell with the following commands found in the threads but it didn't work. The output was Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS. even though VMP was enabled and virtualization was enabled after reboot. To undo this, I had to set up hypervisorlaunchtype auto
    1. Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
    2. bcdedit /set hypervisorlaunchtype off
  3. I tried uninstalling WSL, the Ubuntu distros and everything related. Reboot and go into BIOS. Disable virtualization. Start Windows. Reboot. Re-Enable virtualization. Reboot. Start Windows and install again WSL and ubuntu distros from the windows store. No luck.

I'm stuck on it, any other ideas?

edit: syntax and some more info

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,775 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,708 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Willy Pete 0 Reputation points
    2024-12-26T00:31:05.9333333+00:00

    our problem might be within the W11's core isolation security settings just like when running kali linux will put up a fight to operate might not be 100% but this is where im headed down this rabbit hole.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.