-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I can attach a VMSwitch to WSL using WSLAttachSwitch.exe, and everything works fine. But when I try to delete the VMSwitch afterwords, this operation fails. It fails if I do it using the Hyper-V Manager GUI, and also if I try to do it in Powershell.
Here's a Powershell script that demonstrates the failure:
New-VMSwitch -Name "Testbench VMSwitch" -NetAdapterName MyAdapter
#ensure that WSL is running
wsl.exe sleep 0
WSLAttachSwitch.exe "Testbench VMSwitch"
wsl.exe --shutdown
Start-Sleep -Seconds 10
Remove-VMSwitch "Testbench VMSwitch" -ForceEverything works fine until my call to Remove-VMSwitch. But when I run that, it hangs at 0% until I kill the operation. After I've killed the operation, my machine is in an error-state where I can't modify, overwrite, or remove the VMSwitch instance.
What can I do to kill a switch before trying to delete it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels