WSL icon indicating copy to clipboard operation
WSL copied to clipboard

vEthernet (WSL) is gone after WSL --update

Open yyyyyyyysssss opened this issue 2 years ago • 9 comments

Windows Version

Microsoft Windows [版本 10.0.22621.2715]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu-22.04

Other Software

Docker version 23.0.5, build bc4487a

Repro Steps

wsl --update

Expected Behavior

image image image

Actual Behavior

wsl --update restarts after successful execution. Then the vEthernet (WSL) adapter was gone

Diagnostic Logs

No response

yyyyyyyysssss avatar Jan 07 '24 13:01 yyyyyyyysssss

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

Closed similar issues:

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

github-actions avatar Jan 07 '24 13:01 github-actions

Still not after the first start of wsl

yyyyyyyysssss avatar Jan 07 '24 13:01 yyyyyyyysssss

Hello, Can confirm the issue - after installing the last update and restarting a machine. The WSL spits out. Output when starting wsl or name of a machine:

Failed to configure network (networkingMode Nat). To disable networking, set wsl2.networkingMode=None in C:\Users\<Username>\.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_SERVICE_NOT_ACTIVE

While spitting out: Screenshot 2024-01-08 121018

WSL version(omitted):

WSL version: 2.0.14.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59

Windows Event Logs(HNS-Network-Create): In Custom Events -> Administrative Events:

HNS-Network-Create :- 
 Network id = '{790e58b4-7939-4434-9358-89ae7ddbe87e}'.
 Network type = 'ICS'.
  Result code = '0x80070426'. 

HNS failed to set interface configuration with error '0x80070426'.
NetCfgInstanceId = '{81E1E38E-04C6-484F-AF4B-EE17D4377E6A}'.
HostDnsServerList = '-Missing-'.
HostDnsSuffix = '-Missing-'.
EnableLLMNR = 'false'.
Unique error string = '0'. 

HNS failed to set interface configuration with error '%1'.
NetCfgInstanceId = '%2'.
HostDnsServerList = '%3'.
HostDnsSuffix = '%4'.
EnableLLMNR = '%5'.
Unique error string = '%6'. 

Those logs repeats a few times as an retry somewhere in a code 7 times in a row.

Reinstallation/restart Doesnt fix the problem.

Reinstallation of WSL2 will temporary create a new entry in network devices, but without any reasons soon as the installation is done the network adapter is gone.

I have also tried the current pre-release version 2.0.15.0 - without success.

Screenshot 2024-01-08 155642 Screenshot 2024-01-08 155357 Screenshot 2024-01-08 155345

Registry Setting up registry with values for the missing values: HostDnsServerList and HostDnsSuffix has no effect. Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss

Windows features HyperV + MVP + WSL enabled

Services Something is off with the communication with the service Host Network Service or service itself. I have tried to create my own network adapter in Powershell(HCN/HNS), but the command only returned that service is not started. In services.msc the service is actually running.

Any ideas?

vizo-git avatar Jan 08 '24 17:01 vizo-git

您好, 可以确认问题 - 安装最后一个更新并重新启动计算机后。WSL吐了出来。 启动时输出wsl或name of a machine:

Failed to configure network (networkingMode Nat). To disable networking, set wsl2.networkingMode=None in C:\Users\<Username>\.wslconfig
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/HNS/ERROR_SERVICE_NOT_ACTIVE

吐的时间: 截图2024-01-08 121018

WSL版本(略):

WSL version: 2.0.14.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59

Windows事件日志(HNS-网络-创建): 在自定义事件 -> 管理事件中:

HNS-Network-Create :- 
 Network id = '{790e58b4-7939-4434-9358-89ae7ddbe87e}'.
 Network type = 'ICS'.
  Result code = '0x80070426'. 

HNS failed to set interface configuration with error '0x80070426'.
NetCfgInstanceId = '{81E1E38E-04C6-484F-AF4B-EE17D4377E6A}'.
HostDnsServerList = '-Missing-'.
HostDnsSuffix = '-Missing-'.
EnableLLMNR = 'false'.
Unique error string = '0'. 

HNS failed to set interface configuration with error '%1'.
NetCfgInstanceId = '%2'.
HostDnsServerList = '%3'.
HostDnsSuffix = '%4'.
EnableLLMNR = '%5'.
Unique error string = '%6'. 

这些日志会重复几次,就像代码中某处连续重试7次一样。

重新安装/重新启动 无法解决问题。

安装WSL2时会临时在网络设备中创建一个新的边界,但安装完成后,没有任何原因,网络适配器就重新消失了。

我也尝试过当前的预发布版本 2.0.15.0 - 但没有成功。

截图2024-01-08 155642 截图2024-01-08 155357 截图2024-01-08 155345

栅栏 使用栅栏值的值设置栅栏值:HostDnsServerList 并且HostDnsSuffix没有效果。 Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss

Windows功能 启用HyperV + MVP + WSL

服务 与服务的通信Host Network Service或服务本身出现问题。 我尝试在 Powershell(HCN/HNS) 中创建自己的网络适配器,但该命令仅返回该服务未启动。 在 services.msc 中,服务实际上正在运行。

有什么想法吗?

I changed the bridge mode to host mode is work

image

yyyyyyyysssss avatar Jan 09 '24 07:01 yyyyyyyysssss

Yes, I was thinking as well about this solution, but after writing this post I just fixed it old fashion way.

1. Made a backup of all distributions *.vhd
2. Unistalled WSL app
3. Turned off WSL in Windows features
4. Reboot
5. Installed WSL app + distros(in my case via MS Store)  + Enabled the Windows feature
6. Reboot
7. Started vanilla WSL 
8. Replaced new *.vhds with old ones
9. Fixed

The whole process was quick and in few mins everything was installed.

vizo-git avatar Jan 09 '24 22:01 vizo-git

Hi. Can you please collect networking logs by following the instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

chanpreetdhanjal avatar Jan 09 '24 22:01 chanpreetdhanjal

是的,我也在考虑这个解决方案,但在写完这篇文章后,我只是以旧的方式修复了它。

1. Made a backup of all distributions *.vhd
2. Unistalled WSL app
3. Turned off WSL in Windows features
4. Reboot
5. Installed WSL app + distros(in my case via MS Store)  + Enabled the Windows feature
6. Reboot
7. Started vanilla WSL 
8. Replaced new *.vhds with old ones
9. Fixed

整个过程很快,几分钟内就安装好了所有东西。

Thank you for your reply

yyyyyyyysssss avatar Jan 12 '24 02:01 yyyyyyyysssss

你好。您可以按照以下说明收集网络日志吗? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

I changed the bridge mode to host mode is work. Not for a while, thank you

yyyyyyyysssss avatar Jan 12 '24 02:01 yyyyyyyysssss

I think wsl has a thing with windows home editions (well no hyper-v that should be obvious...), even after enabling hper-v manually the vEthernet will not appear, the only fix i did was to set:

wsl --set-version [distro] 1

i figured the wsl im using doesnt use vEthernet it uses "NAT"labelled as "Local area network" that should be a final fix.

Kevinskcy avatar Jun 13 '24 07:06 Kevinskcy