[Solved] WSL 2 not working when using the Gaming template. What am I missing?

mvierssen

New Member
When I install WSL and Ubuntu I get the following error:

Code:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007273f
Error: 0x8007273f An address incompatible with the requested protocol was used.

This is probably not an issue with ntlite, but just me not knowing what components are required for WSL to work. I selected the gaming template, re-enabled some components and enabled everything under compatibility except icloud and samsung smart switch.

According to the following discussion https://github.com/microsoft/WSL/issues/7183 it could be the Hyper-V RAW network protocol Address Family: 34 that is missing which should be returned by netsh winsock show catalog.

Steps to reproduce using CMD, currently only tested in Windows 11:

Code:
> dism.exe /online /enable-feature /featurename:Microsoft-Hyper-V /all /norestart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

restart and download WSL kernel update

Code:
> wsl_update_x64.msi
> wsl --set-default-version 2
> winget install --exact --id Canonical.Ubuntu --scope user --accept-package-agreements --accept-source-agreements --silent
> ubuntu

What do I have to reenable to fix this?

Sidenote for ntlite dev(s): the Touch Keyboard and Handwriting Panel Service is required for Windows Terminal to work (included by default in Windows 11)
 

Attachments

  • mvierssen-w11-v7-stripped.xml
    32.6 KB
Last edited:
When you select Gaming template, it removes most of the optional Features. So you really can't use both together.

Capture.PNG

Return to Components, and Reset to clear the template.
Head over to Features, and enable Hyper-V and WASL. Saving your preset, these new lines should appear:

<Feature name="Microsoft-Hyper-V-Hypervisor">true</Feature>
<Feature name="Microsoft-Hyper-V">true</Feature>
<Feature name="Microsoft-Hyper-V-All">true</Feature>
<Feature name="Microsoft-Windows-Subsystem-Linux">true</Feature>

Those lines perform your DISM /enable-feature commands.



https://docs.microsoft.com/en-us/windows/terminal/troubleshooting#keyboard-service-warning
Starting in Windows Terminal 1.5, the Terminal will display a warning if the "Touch Keyboard and Handwriting Panel Service" is disabled. This service is needed by the operating system to properly route input events to the Terminal application (as well as many other applications on Windows).
 
When you select Gaming template, it removes most of the optional Features. So you really can't use both together.

View attachment 6856

Return to Components, and Reset to clear the template.
Head over to Features, and enable Hyper-V and WASL. Saving your preset, these new lines should appear:

<Feature name="Microsoft-Hyper-V-Hypervisor">true</Feature>
<Feature name="Microsoft-Hyper-V">true</Feature>
<Feature name="Microsoft-Hyper-V-All">true</Feature>
<Feature name="Microsoft-Windows-Subsystem-Linux">true</Feature>

Those lines perform your DISM /enable-feature commands.



https://docs.microsoft.com/en-us/windows/terminal/troubleshooting#keyboard-service-warning

Thank you. I keep the HyperV, Linux Subsystem disabled by default and install them myself using DISM once Windows is installed. That is not my issue though. The issue is that after enabling those features and following the required steps to install WSL with Ubuntu I get the following error:
Code:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007273f
Error: 0x8007273f An address incompatible with the requested protocol was used.
The thing about Windows Terminal was just a side note so that Windows Terminal can may be added to the compatibility list or added to the Tablet PC line.
 
Fixed it.

I had to disable the VirtualMachinePlatform, Hyper-V and WSL features:
Code:
> dism.exe /online /disable-feature /featurename:Microsoft-Hyper-V /all /norestart
> dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart
> dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
Then I had to re-enable only the VirtualMachinePlatform and WSL features:
Code:
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
So it could have been Hyper-V conflicting or the first time I enabled those features something went wrong installing them.
 
I had same issue when Hyper-V is activated... and also virtualmachineplatform or androidsubsystem (one of them) might be unnecessary for ubuntu too? did u check it?
 
In fact ONLY Virtual Machine Platform is required for WSL2; VMP is the subset of Hyper-V required for WSL2 extracted from the full Hyper-V to be made available to Home windows editions which don't provide Hyper-V.
 
I did multiple reinstalls of my custom windows ISO. What fixes it every time is disabling and then enabling the VirtualMachinePlatform feature. The first time VirtualMachinePlatform is enabled, it is broken, Hyper-V RAW is missing. Then when I disable and enable VirtualMachinePlatform again, Hyper-V RAW is there. This is probably a bug in Microsoft Windows.
 
Back
Top