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

Error : Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_FILE_NOT_FOUND #11412

Closed
1 of 2 tasks
Gam5g opened this issue Apr 2, 2024 · 2 comments
Closed
1 of 2 tasks

Comments

@Gam5g
Copy link

Gam5g commented Apr 2, 2024

Windows Version

Windows 11

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

20.04

Other Software

No response

Repro Steps

Hello,

I was attempting to run Ubuntu via WSL 2, but after encountering a storage issue that prevented it from launching, I deleted some files, which led to further complications. Here's what happened when I tried to reinstall Ubuntu:

Initially, when I used Windows PowerShell to execute wsl --install, I received the following messages:

Installing, this may take a few minutes...

WslRegisterDistribution failed with error: 0x80070002

Error: 0x80070002 The system cannot find the file specified.

Additionally, after configuring .wslconfig in Ubuntu as shown below, I encountered another error:

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

Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_FILE_NOT_FOUND

Here are the .wslconfig settings I used:

[wsl2]

memory=16GB

processors=2

swap=1GB

Moreover, when I try to run sudo apt-get update or upgrade in Ubuntu, I get errors indicating a lack of network connection. This issue arises when I add networkingMode=None to the .wslconfig:

$ sudo apt update

Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease

Temporary failure resolving 'security.ubuntu.com'

Err:2 http://archive.ubuntu.com/ubuntu focal InRelease

Temporary failure resolving 'archive.ubuntu.com'

Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease

Temporary failure resolving 'archive.ubuntu.com'

Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease

Temporary failure resolving 'archive.ubuntu.com'

Reading package lists... Done

Building dependency tree

Reading state information... Done

All packages are up to date.

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

Expected Behavior

np.

Actual Behavior

Furthermore, trying to ping 8.8.8.8 results in:

$ ping -c 4 8.8.8.8

ping: connect: Network is unreachable

In summary, it seems to be a network issue within the Ubuntu environment that I'm unable to resolve. Given the details above, could you please advise on a solution?

Thank you for your assistance.

Diagnostic Logs

No response

Copy link

github-actions bot commented Apr 2, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

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!

Open similar issues:

Closed similar issues:

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

Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant