microsoft / WSL

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

Enable kexec support in the WSL kernel, or read WSL kernel from rootfs #11950

Open nrclark opened 1 month ago

nrclark commented 1 month ago

I mantain a WSL distribution at my company, and I want to include a custom distro-specific kernel.

Can you implement one of:

github-actions[bot] commented 1 month ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

nrclark commented 1 month ago

/feature

github-actions[bot] commented 1 month ago
Diagnostic information ``` Found '/feature', adding tag 'feature' ```
fanoush commented 4 weeks ago

this is possibly related to https://github.com/microsoft/WSL/issues/4967

well unless you don't expect more kernels/distros to be running concurrently, but then you could simply use existing feature of WSL to have custom kernel set up in .wslconfig as per https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings

And BTW it is likely that you can't use distro kernel directly as is but need to compile your own version of it from distro sources with similar kernel config to https://github.com/microsoft/WSL2-Linux-Kernel to have some WSL support in kernel enabled.

As for the concurrent run of multiple kernels - I am no expert on WSL internals but I guess currently WSL shares the kernel for all WSL distros running and is reusing one lightweight VM to do this and multiple concurrent kernels would need more such VMs

And then the question is why not to run this distro with own distro kernel in normal Hyper-V VM instead of WSL