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

Can't start distro on WSL 2.0.5 with any networkingMode besides None #10666

Closed
1 of 2 tasks
leonardobsjr opened this issue Oct 23, 2023 · 11 comments
Closed
1 of 2 tasks
Assignees

Comments

@leonardobsjr
Copy link

Windows Version

Microsoft Windows [Version 10.0.22621.2428]

WSL Version

2.0.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Start a distro

Expected Behavior

Being able to use the distro

Actual Behavior

Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0x800704db and asks me to change the networking mode to NAT. It also doesn't work on NAT and asks me to change it to None,

Diagnostic Logs

WslLogs-2023-10-23_13-01-01.zip

@sirredbeard
Copy link
Contributor

Do you have any third-party firewall or security software installed?

@benhillis
Copy link
Member

@keith-horton - looks like the user has Hyper-V enabled by not virtual machine platform. HcnEnumerateNetworks is returning an error:

HcnEnumerateNetworks({"SchemaVersion":{"Major":0,"Minor":0},"Filter":"{"Flags": 328}"}) {"Success":false,"Error":"The specified service does not exist. vfpext driver is either not installed or is not enabled.","ErrorCode":2147943643}

@benhillis
Copy link
Member

@leonardobsjr - could you take another trace with networkingMode=NAT please? I want to see if it's a different error path.

@keith-horton
Copy link
Member

We can see VMP is not installed. @leonardobsjr , if you go through the Start menu, you can open the "Turn Windows features on or off" -- from there, you will need to install "Virtual Machine Platform".

@benhillis
Copy link
Member

@keith-horton - thanks. We should make this error condition a bit more clear, I'll see what I can come up with.

@leonardobsjr
Copy link
Author

Yeah, that's it, @keith-horton nailed it. Thanks for the feedback guys and sorry for the trouble. I was using WSL2 (or maybe not? it was 1.2.5 before), I had absolutely no idea I had to install anything else. The fact that I was able to make it work with None or bridged mode was even weirder. I see on troubleshoot guide this but that wasn't the message I was getting so I didn't even consider it. Commenting this but not closing because I don't really now know how your guys workflow works. :)

@benhillis
Copy link
Member

I just made a fix that will make the error message cleaner if you're in this state. Thanks for posting!

@huiminghao
Copy link

huiminghao commented Oct 25, 2023

I have the same problem here.
I have 2 pc. One runs WSL2 2.0.6 and fine. The other one runs WSL2 2.0.4 fine, but not with 2.0.5 and 2.0.6. Its Terminal say:
C:\Users\haohuiming>wsl 无法配置 networkingMode Nat)(网络。若要禁用网络,请在C:\Users\haohuiming\.wslconfig中设“wsl2.networkingMode=None” Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424
Tried with 1.2.5/2.0.0/2.0.2,all the versions works.
config:

[wsl2]
memory=24GB

[experimental]
autoMemoryReclaim=gradual
# networkingMode=mirrored
dnsTunneling=true
# firewall=true
autoProxy=true

@cloph
Copy link

cloph commented Oct 25, 2023

@huiminghao I also experienced the problem, but like as the original reporter,I had Hyper-V enabled, but did not have VM platform installed.
Installing VM platfrom from from windows features fixed the problem (using wsl 2.0.6.0, Win 11 23H2) - so please see #10666 (comment) above: If you have Hyper-V on the machine where it doesn't work, installing VM platform feature should fix the problem. If it doesn't, I think it is better to write a separate ticket (I was getting the same errorcode as you 0x80070424, and the same symptoms, so pretty sure it is the same cause & solution - of course no idea what changed in wsl to have that change in requirements, it did work fine in older versions of wsl, but I guess it is related to the new mirrored networking mode/overall rewrite of network stuff, so I'm not complaining....)

@scofieldcool
Copy link

I have the same problem here. I have 2 pc. One runs WSL2 2.0.6 and fine. The other one runs WSL2 2.0.4 fine, but not with 2.0.5 and 2.0.6. Its Terminal say: C:\Users\haohuiming>wsl 无法配置 networkingMode Nat)(网络。若要禁用网络,请在C:\Users\haohuiming\.wslconfig中设“wsl2.networkingMode=None” Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/0x80070424 Tried with 1.2.5/2.0.0/2.0.2,all the versions works. config:

[wsl2]
memory=24GB

[experimental]
autoMemoryReclaim=gradual
# networkingMode=mirrored
dnsTunneling=true
# firewall=true
autoProxy=true

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.

@benhillis
Copy link
Member

Fixed in https://github.com/microsoft/WSL/releases/tag/2.0.7.

@huiminghao - you seem to be hitting something else, please open a new issue.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants