Open BrandonStudio opened 1 year ago
Thanks for reporting this @BrandonStudio. The error you're seeing is due to the fact that ServerCore doesn't support appx packages.
To install a distribution on serverCore, you can follow these instructions
@OneBlue I did follow that instruction, which told me to install the appx package
@BrandonStudio: The appx packages can't be installed on ServerCore, what you need to do is to download them manually and extract their content. You can find explanations on how to do that in the Install WSL on previous versions of Windows Server
section of the link I shared earlier
@OneBlue Did you see the Add-AppxPackage in the link? I've said that I got an error executing that, and have post the error here
Ah you're right, I assumed that this documentation covered ServerCore but it actually doesn't. For this Edition you need to extract the .appx and manually import the distro. Here's how to do that with debian for instance (powershell):
curl.exe https://wslstorestorage.blob.core.windows.net/wslblob/TheDebianProject.DebianGNULinux_1.12.2.0_neutral___76v4gfsz19hv4.AppxBundle --output debian.zip
mkdir $env:LocalAppData\lxss\debian
Expand-Archive .\debian\DistroLauncher-Appx_1.12.2.0_x64.appx
mv .\debian\DistroLauncher-Appx_1.12.2.0_x64.appx debian-inner.zip
Expand-Archive debian-inner.zip
wsl --import debian $env:LocalAppData\lxss\debian .\debian-inner\install.tar.gz --version 2
@craigloewen-msft : We should add a documentation page on how to do that
@OneBlue wsl.exe
still exit immediately without any output
I do think there are more than 1 problems, 'cause even wsl --help
returns blank.
Thanks for following @BrandonStudio.
There's indeed an issue on Server Core SKU's right now where wsl.exe is crashing. We're working on backporting the fix.
Reopening to keep track of that issue.
This issue appears to be caused by KB5026370 (OS Build 20348.1726)
wusa /uninstall /kb:5026370
After a reboot, WSL is working again in Server Core 2022
This issue appears to be caused by KB5026370 (OS Build 20348.1726)
wusa /uninstall /kb:5026370
After a reboot, WSL is working again in Server Core 2022
But the KB page mentions that:
Running Windows Update Standalone Installer (wusa.exe) with the /uninstall switch on the combined package will not work because the combined package contains the SSU. You cannot remove the SSU from the system after installation.
It seems this has been fixed, but my Windows version is still 10.0.20348.
I can now install Ubuntu 20.04 for wsl1, by directly running the unzipped ubuntu.exe
.
I can't set wsl2 because my VM level does not support nested virtualization.
wsl --install
and wsl --update
is as expected unable to work, reporting "Class not registered"
Windows Version
Windows Server 2022 Datacenter Core Azure Edition 10.0.20348
WSL Version
don't know
Are you using WSL 1 or WSL 2?
Kernel Version
don't know
Distro Version
don't know
Other Software
No response
Repro Steps
None of the below commands respond (exit immediately without any output):
But I do have
wsl.exe
:When I try to install Ubuntu distribution manually following instructions here, I got this error message:
And when I try to install VC runtime by this instruction, I got this error:
Both Hyper-V and WSL feature are enabled.
Expected Behavior
see above
Actual Behavior
see above
Diagnostic Logs
No response