You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something I'm looking at, but someone may already have a solution to share with everyone.
When WSL2 starts it creates a virtual adapter named "vEthernet (WSL)" and assigns it some random IP address. When WSL is shutdown the virtual network adapter remains with all its settings intact. When WSL is cold-started again then that virtual adapter's settings are utilised. Same IP addresses and settings. These are lost when Windows 10 OS is shutdown.
Is there a way using PowerShell to create and pre-configure "vEthernet (WSL)" with all the desired settings so when the Windows 10 OS starts. "vEthernet (WSL)" is already there and does not need to be re-created when WSL2 kernel cold-starts.
This would get round guest machines having to deal with changing local network addresses after every start-up of Windows 10.
Effectively, this gives the WSL2 guest OS a permanent static IP address and always be on the same subnet. I guess this would also work with IPv6.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Something I'm looking at, but someone may already have a solution to share with everyone.
When WSL2 starts it creates a virtual adapter named "vEthernet (WSL)" and assigns it some random IP address. When WSL is shutdown the virtual network adapter remains with all its settings intact. When WSL is cold-started again then that virtual adapter's settings are utilised. Same IP addresses and settings. These are lost when Windows 10 OS is shutdown.
Is there a way using PowerShell to create and pre-configure "vEthernet (WSL)" with all the desired settings so when the Windows 10 OS starts. "vEthernet (WSL)" is already there and does not need to be re-created when WSL2 kernel cold-starts.
This would get round guest machines having to deal with changing local network addresses after every start-up of Windows 10.
Effectively, this gives the WSL2 guest OS a permanent static IP address and always be on the same subnet. I guess this would also work with IPv6.
Beta Was this translation helpful? Give feedback.
All reactions