I have a Windows 2025 Server Core VM running on Azure. I have an azure devops build agent, docker for windows containers, and powershell core running on it. All this is working fine.
I ran the WSL command with no parameters and said yes to the prompt to install WSL.
Then I try to install WSL:
PS C:\Users\azadmin> wsl --install Ubuntu-18.04
Downloading: Ubuntu 18.04 LTS
Installing: Ubuntu 18.04 LTS
PS C:\Users\azadmin> wsl
Windows Subsystem for Linux has no installed distributions.
Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install <Distro>' to install.
Distributions can also be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Error code: Wsl/Service/CreateInstance/GetDefaultDistro/WSL_E_DEFAULT_DISTRO_NOT_FOUND
I did some research and realized I needed to scale up from a B series to a D series to enable Hyper-V nested virtualization when Install-WindowsFeature Hyper-V
failed. So then I ran the following and restarted:
Install-WindowsFeature Hyper-V,Containers,DHCP
Still no change in behavior.
I even spun up a second brand new Server Core VM and verified the same behavior.
** Windows Server 2022 **
I get a different error with the latest refresh of Server 2022 Class not registered
PS C:\Users\azadmin> wsl --install -d ubuntu
Class not registered
PS C:\Users\azadmin> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
>>
OS Name: Microsoft Windows Server 2022 Datacenter Azure Edition
OS Version: 10.0.20348 N/A Build 20348
PS C:\Users\azadmin>
I even tried Install-WindowsFeature Microsoft-Windows-Subsystem-Linux
.
All that did was add one extra line to the output of wsl --install
PS C:\Users\azadmin> wsl --install
Windows Subsystem for Linux is already installed.
Class not registered
PS C:\Users\azadmin>