microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.37k stars 816 forks source link

WSL2 ARM won't load compressed kernel #9791

Closed elsaco closed 7 months ago

elsaco commented 1 year ago

Windows Version

Microsoft Windows [Vesion 10.0.22621.1413]

WSL Version

1.1.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.90.1

Distro Version

Ubuntu 23.04

Other Software

No response

Repro Steps

  1. Build linux-msft-wsl-5.15.90.1 using config-wsl-arm64
  2. Add custom kernel setting to .wslconfig
  3. Run wsl --shutdown
  4. Start a distro

Expected Behavior

WSL distro starts with custom kernel.

Actual Behavior

If kernel is compressed WSL won't start. After minutes it shows timeout errors:

The operation timed out because a response was not received from the virtual machine or container.
Error code: Wsl/Service/CreateInstance/CreateVm/HCS_E_CONNECTION_TIMEOUT
Press any key to continue...

Diagnostic Logs

It works if the custom kernel image is uncompressed.

benhillis commented 1 year ago

Repro steps are incomplete, which kernel binary are you using? For ARM64 we're booting from UEFI so it will need to contain the loader.

elsaco commented 1 year ago

These are the targets from arch/arm64/boot/Makefile:

targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo

It defaults to Image.gz so running make builds a compressed kernel image. When added to .wslconfig it won't boot. If the kernel image is being uncompressed then WSL starts okay. Removing the extension .gz it won't work either. I tried bz2 image also w/out success. There is no option to build bzImage for arm64

Tested on DevKit 2023 (a.k.a Volterra) but it shouldn't matter the platform.

microsoft-github-policy-service[bot] commented 7 months ago

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!