You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
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
The text was updated successfully, but these errors were encountered:
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:
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!
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.
Windows Version
Windows 11
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
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
orupgrade
in Ubuntu, I get errors indicating a lack of network connection. This issue arises when I addnetworkingMode=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
The text was updated successfully, but these errors were encountered: