Monday, 5 December 2022

WSL2 On Windows 10 Running WSLg

This is now possible with Windows 10 and solves some problems that occur with firewalls and WSL2.

The problems are:

  • https://github.com/microsoft/WSL/issues/5256
  • https://github.com/microsoft/WSL/issues/4139
  • https://github.com/microsoft/WSL/issues/4585

In particular:

New-NetFirewallRule -DisplayName "_WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow

didn't appear to allow DNS, but I had already set up DNS as below which works.

What I did:

  1. Follow instructions here - https://github.com/epomatti/wsl2-dns-fix-config to set a DNS server - I am using the internal one for the company that I find using ipconfig /all
  2. Update Windows 10 to latest UBR (must be at least 2311)
  3. If version is not at least UBR 2311 then it should now be possible to install via Windows Update the latest 22H2 Cumulative Update to get the version up to 10.0.19045.2364.
  4. If you can't get to at least UBT 2311 you can try getting KB5020030 from the Microsoft update catalog and install manually, although proceed at your own risk.
  5. Try in command prompt wsl –update
  6. 4) If that doesn’t work try installing Ubuntu WSL2 from the App Store

Useful Links

Microsoft Update Catalog for KB5020030

Running WSL that was installed from the Microsoft Store results in "Windows version 10.0.19045.2251 does not support the packaged version of ..." - Super User

https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps


No comments:

Post a Comment