WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Can't restart the WSL Net Adapter

Open Michael-Brooks opened this issue 5 years ago • 3 comments

Windows Build Number

Microsoft Windows [Version 10.0.22000.71]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.10.43

Distro Version

Ubuntu 20.04.2 LTS

Other Software

No response

Repro Steps

In Windows PowerShell, I run Ipconfig /all to list my network adapters. I can see "Ethernet adapter vEthernet (WSL)" is listed as the network adapter I would like to reset.

I then type Restart-NetAdapter -Name "vEthernet (WSL)" in Windows PowerShell to restart the network adapter, but I get an error message.

I've tried uninstalling and reinstalling Ubuntu and WSL from the "Turn Windows Features on or off" app. I've also tried running the command with elevated permissions with the same error.

Expected Behavior

Once I run Restart-NetAdapter -Name "vEthernet (WSL)" the network adapter should successfully be reset.

Actual Behavior

> Restart-NetAdapter -Name "vEthernet (WSL)"
Restart-NetAdapter : {Application Error} The exception %s (0x
At line:1 char:1
+ Restart-NetAdapter -Name "vEthernet (WSL)"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_NetAdapter...SKTOP-DUPV0KE"):ROOT/StandardCimv2/MSFT_NetAdapter) [Re
   start-NetAdapter], CimException
    + FullyQualifiedErrorId : Windows System Error 574,Restart-NetAdapter

Diagnostic Logs

No response

Michael-Brooks avatar Jul 20 '21 09:07 Michael-Brooks

@Michael-Brooks - what is your goal with resetting the network adapter?

benhillis avatar Jul 21 '21 15:07 benhillis

@benhillis I'm currently having issues with Docker Desktop which can be seen with #7204. Someone in the Docker Desktop issues said that restarting the WSL network adapter resolved their issue. I thought that it might also resolve mine. For reference, this is the issue talking about restarting the network adapter... https://github.com/docker/for-win/issues/11685#issuecomment-882698440

Michael-Brooks avatar Jul 22 '21 06:07 Michael-Brooks

I managed to restart the network adapter with elevated permissions which didn't work before. I'm closing the issue but it still didn't fix my problem with #7204.

Michael-Brooks avatar Jul 22 '21 07:07 Michael-Brooks