-
Notifications
You must be signed in to change notification settings - Fork 798
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
WSL2 networking no IP-address, fresh Win10 20H2 install #6457
Comments
Thanks for reporting this @b9AcE. Can you please follow the Networking issues instructions and share the logs on this issue ? Please also share the output of |
Certainly, @OneBlue!
|
@b9AcE: This script also creates a log file, |
Of course, @OneBlue! |
Thanks @b9AcE. I'm a bit puzzled because I don't see any WSL log entry in the file you shared. I've created a PR to fix that, but until its merged, can you please run the script again from this branch ? |
OK, @OneBlue, I re-ran the script from that branch instead and the resulting file is now in the same location as before: |
Thank you @b9AcE. Downloaded the file. |
@b9AcE: Looking at the logs, it appears that something is going wrong when WSL attempts to create the swap disk. An error there would kill the code path that configures networking. Can you try to set |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Thanks @OneBlue!
After a reboot, that workaround still works. If so, it's likely that enough people get affected by this issue that probably the symlink-workaround should get added to the Troubleshooting Windows Subsystem for Linux-page. Thanks again! |
@b9AcE - Did the $env:USERPROFILE\AppData\Local\Temp directory not exist prior to your creation of the symlink? |
No @benhillis, I had deleted it as well as "$env:SystemRoot\TEMP" as part of my standard installation step of unifying the several temp-directory locations to instead only use "$env:SystemDrive" for all four temp-variables. |
Hi, I can create a symbolinc link with your command: Au caractère Ligne:1 : 1
New-Item : Impossible de créer un fichier déjà existant (which means impossible to create an existing file) Do you have a solution please ? |
Sounds to me like there already is a directory (or file) in that location with the same name as you are trying to create, @samuelguesnier. |
Thanks for your answer @b9AcE ! You are right , there is already a Temp folder in %USERPROFILE%\AppData\Local . |
Unless you know that you have changed your system's environment variables %TEMP% and/or %TMP% it seems this solution is irrelevant to you @samuelguesnier, as far as I can tell. |
Oh ok, thanks |
For some reason, changing the |
Environment
Steps to reproduce
Freshly installed Windows 10 version 20H2 with all Windows Updates applied.
Followed "Manual Installation Steps" https://docs.microsoft.com/en-us/windows/wsl/install-win10 for WSL2.
Had already installed the relevant features amongst others using the "Turn Windows features on or off" GUI, but ran the relevant commands listed in the instructions anyway.
Installed and ran Debian (since Devuan isn't in Microsoft Store) before the switch to WSL2 as default, to ensure the initial distro-configuration would not break, as has happened on previous installs. Also ran "/usr/bin/apt update && /usr/bin/apt dist-upgrade" successfully at that time (thus, there was functional networking).
Then set WSL2 as default, converted Debian to be WSL2 and rebooted an extra time to ensure everything was fully restarted as WSL2.
Upon reentering the now WSL2-mode Debian, no IP-address is assigned to the networking device.
Had at that point not modified any system configuration in the Debian installation.
Tried applying this #6433 (comment) suggestion, but that did not change the result, still no IP-address.
I have now had this error on at least 7 fresh reinstalls of Windows 10 version 2004 or newer and the only way to get networking functional in WSL2 seems to be to on every reboot use the "Virtual Switch Manager" in "Hyper-V Manager" to set the auto-created Virtual Switch "WSL" to "external network" pointing to the actual network interface and then on every fresh start of WSL2 manually request a DHCP-assigned address by "/sbin/dhclient -4 -1 eth0" and then request it manually again every time the lease times out.
This is obviously not... as expected, but quite inconvenient in particular since WSL2 was the one and only feature of Windows 10 version 2004 I was looking forward to, but this level of disfunctionality makes it practically unusable.
Converting a distro back to WSL1 makes networking functional again.
No third-party firewall/antivirus installed, yet.
No VPN installed, yet. Installing VPNs on previous installations of Windows 10 does not seem to have affected this issue at all.
The physical networking device is the motherboard internal only one (wired), with no additional networking devices ever connected to the computer since the fresh install, although attaching a USB-connected 802.11 card to previous installs of Windows did not seem to affect the issue, apart from having to select a different device during the Virtual Switch workaround described previously.
No third party virtual machine software installed, yet. Installing VMware and/or VirtualBox on previous installs of Windows 10 does not seem to have affected the issue then either.
Expected behavior
Functional networking in WSL2.
Actual behavior
No networking in WSL2 unless repeated workaround steps are performed.
The text was updated successfully, but these errors were encountered: