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

WSL2 update to V2.2.4.0 on Win11: WSL loses network adapter "vEthernet (WSL)" #11824

Closed
1 of 2 tasks
fwidmann opened this issue Jul 23, 2024 · 5 comments
Closed
1 of 2 tasks
Labels

Comments

@fwidmann
Copy link

Windows Version

Microsoft Windows 11 Enterprise 23H2 [Version 10.0.22631.3880]

WSL Version

WSL-Version: 2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Other Software

Docker Desktop V4.32.0 (Windows)
Oracle VirtualBox 7.0.18 r162988
Visual Studio 2022 V17.10.4
Visual Studio Code V1.9.1.1 (Windows)
... and a lot of other software - it´s a developer workstation

Repro Steps

I did the following:

  1. added the Windows feature "Windows Subsystem for Linux" on my workstation
  2. installed the distribution Ubuntu-22.04 in wsl (wsl --install --distribution Ubuntu-22.04)
    • At this point, the network is still working. I can access remote network resources from the WSL VM and I can find the network adapter "vEthernet (WSL)" in the Windows environment.
    • wsl --version does not work at this point
  3. perform the WSL update (wsl --update)
    • Now, network connections from the WSL VM are no longer possible.
    • The network adapter "vEthernet (WSL)" is missing in the Windows environment.

This behaviour is reproducible. Unfortunately, it is very time-consuming, as the entire WSL system (including Windows features) has to be deleted and reinstalled each time.

Expected Behavior

My expectation is that network access will continue to work after the update of the WSL system (step 3).

Actual Behavior

Network access from the WSL VM is not possible.

Available interfaces:

fwidmann@nbm0306:/mnt/c/WSL$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet 10.255.255.254/32 brd 10.255.255.254 scope global lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:15:5d:8d:c4:39 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether fc:5c:ee:cd:44:bd brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether f4:a8:0d:c0:e0:80 brd ff:ff:ff:ff:ff:ff
    inet 192.168.73.226/22 brd 192.168.75.255 scope global noprefixroute eth2
       valid_lft forever preferred_lft forever
    inet6 fe80::9c3b:ac53:df7d:df4a/64 scope link nodad noprefixroute
       valid_lft forever preferred_lft forever
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 0a:00:27:00:00:17 brd ff:ff:ff:ff:ff:ff
6: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:e0:4c:08:0d:ff brd ff:ff:ff:ff:ff:ff
7: loopback0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:10:e1:41 brd ff:ff:ff:ff:ff:ff
8: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether e4:c7:67:f9:23:d8 brd ff:ff:ff:ff:ff:ff

IP routing

fwidmann@nbm0306:/mnt/c/WSL$ ip r
default via 192.168.72.11 dev eth2 proto kernel metric 25
192.168.72.0/22 dev eth2 proto kernel scope link metric 281
192.168.72.11 dev eth2 proto kernel scope link metric 25

But no network access

fwidmann@nbm0306:/mnt/c/WSL$ ping -c 2 -4 192.168.72.11
PING 192.168.72.11 (192.168.72.11) 56(84) bytes of data.
From 192.168.73.226 icmp_seq=1 Destination Host Unreachable
From 192.168.73.226 icmp_seq=2 Destination Host Unreachable

--- 192.168.72.11 ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1000ms
pipe 2

Try to access the Ubuntu archive:

fwidmann@nbm0306:/mnt/c/WSL$ wget -dS http://archive.ubuntu.com
Setting --server-response (serverresponse) to 1
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2024-07-23 14:56:19--  http://archive.ubuntu.com/
Resolving archive.ubuntu.com (archive.ubuntu.com)... 91.189.91.81, 185.125.190.82, 185.125.190.83, ...
Caching archive.ubuntu.com => 91.189.91.81 185.125.190.82 185.125.190.83 185.125.190.81 91.189.91.82 91.189.91.83 2620:2d:4000:1::101 2620:2d:4002:1::101 2620:2d:4002:1::103 2620:2d:4002:1::102 2620:2d:4000:1::103 2620:2d:4000:1::102
Connecting to archive.ubuntu.com (archive.ubuntu.com)|91.189.91.81|:80... Closed fd 3
failed: No route to host.
Connecting to archive.ubuntu.com (archive.ubuntu.com)|185.125.190.82|:80... Closed fd 3
failed: No route to host.
[...]
Releasing 0x0000562542deda70 (new refcount 1).

Windows host: list of network adapters

The adapter "vEthernet (WSL)" is missing!

PS C:\WSL> Get-NetAdapter -Name "v*" -IncludeHidden | Format-List

Name                       : VirtualBox host-only
InterfaceDescription       : VirtualBox Host-Only Ethernet Adapter
InterfaceIndex             : 23
MacAddress                 : 0A-00-27-00-00-17
MediaType                  : 802.3
PhysicalMediaType          : 802.3
InterfaceOperationalStatus : Up
AdminStatus                : Up
LinkSpeed(Gbps)            : 1
MediaConnectionState       : Connected
ConnectorPresent           : False
DriverInformation          : Driver Date 2024-05-02 Version 7.0.18.12988 NDIS 6.0

Name                       : vSwitch (FSE Switch)
InterfaceDescription       : Hyper-V Virtual Switch Extension Adapter #2
InterfaceIndex             : 99
MacAddress                 :
MediaType                  : 802.3
PhysicalMediaType          : Unspecified
InterfaceOperationalStatus : Up
AdminStatus                : Up
LinkSpeed(Gbps)            : 10
MediaConnectionState       : Connected
ConnectorPresent           : False
DriverInformation          : Driver Date 2006-06-21 Version 10.0.22621.1 NDIS 6.83

Name                       : vEthernet (FSE HostVnic)
InterfaceDescription       : Hyper-V Virtual Ethernet Container Adapter
InterfaceIndex             : 103
MacAddress                 : 00-15-5D-45-29-0F
MediaType                  : 802.3
PhysicalMediaType          : Unspecified
InterfaceOperationalStatus : Up
AdminStatus                : Up
LinkSpeed(Gbps)            : 10
MediaConnectionState       : Connected
ConnectorPresent           : False
DriverInformation          : Driver Date  Version

Name                       : vEthernet (Default Switch)
InterfaceDescription       : Hyper-V Virtual Ethernet Adapter
InterfaceIndex             : 27
MacAddress                 : 00-15-5D-19-BB-A7
MediaType                  : 802.3
PhysicalMediaType          : Unspecified
InterfaceOperationalStatus : Up
AdminStatus                : Up
LinkSpeed(Gbps)            : 10
MediaConnectionState       : Connected
ConnectorPresent           : False
DriverInformation          : Driver Date  Version

Name                       : vSwitch (Default Switch)
InterfaceDescription       : Hyper-V Virtual Switch Extension Adapter
InterfaceIndex             : 6
MacAddress                 :
MediaType                  : 802.3
PhysicalMediaType          : Unspecified
InterfaceOperationalStatus : Up
AdminStatus                : Up
LinkSpeed(Gbps)            : 10
MediaConnectionState       : Connected
ConnectorPresent           : False
DriverInformation          : Driver Date 2006-06-21 Version 10.0.22621.1 NDIS 6.83

Diagnostic Logs

I glady provide further information. However, I need your support for this.
I am a senior software developer but still a complete beginner in terms of WSL or Hyper-V.

Copy link

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 script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

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 wsl-gh-logs@microsoft.com 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.

@fwidmann
Copy link
Author

I have created and uploaded the logs according to the instructions.
However, the WSL runs under my user account, whereas I had to run the script for the log generation under an admin account.
It is also possible that some data is missing. For example, there is no output from tcpdump because the utility is not installed (no internet access).

WslNetworkingLogs-2024-07-23_15-15-13.zip

WslLogs-2024-07-23_15-16-20.zip

Copy link

Diagnostic information
Multiple log files found, using: https://github.com/user-attachments/files/16349446/WslNetworkingLogs-2024-07-23_15-15-13.zip
Detected appx version: 2.2.4.0
optional-components.txt not found
Detected user visible error: Wsl/Service/CreateInstance/GetDefaultDistro/WSL_E_DEFAULT_DISTRO_NOT_FOUND
Detected user visible error: Wsl/Service/CreateInstance/GetDefaultDistro/WSL_E_DEFAULT_DISTRO_NOT_FOUND

@fwidmann
Copy link
Author

What is the second task that seems to be missing here?

@fwidmann
Copy link
Author

Solved! That was a mistake on my part.

I had mentally located the .wslconfig file in the Linux environment - a file name beginning with a dot historically belongs in the *nix world, but not in the Windows world.
That's why I always edited this file in my WSL VM - only once was it created in the Windows UserProfile. And then this file with the entry networkingMode=mirrored was in my UserProfile ... which understandably resulted in no network interface being created, ...

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

No branches or pull requests

2 participants