-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] allow loading native linux kernel modules #1893
Comments
I'll let the WSL team respond with any further thoughts. But it seems to me that this is "works as expected" given that WSL is intended to implement Linux userspace, not Linux kernelspace? |
@mailinglists35 - There are no Linux kernel internals for "module zfs" to wire into on WSL. Because, there are no Linux kernel internals. Now, |
The Linux Kernelmode ABI is not stable, so this is probably impossible. WSL's kernelmode does not even resemble the Linux kernel. The whole reason WSL can relatively easily target usermode is that the Linux Kernel maintainers have a specific goal of not breaking the usermode ABI unless totally necessary. WSL support for "kernel modules" will come as Microsoft writes compatibility layers between the abstracted hardware, or later eventually from driver writers if Microsoft documents WSL'S driver API and adds it to the Windows Driver Kit and KMDF. But I don't think we are super close to this coming out yet. |
Unfortunately loading native Linux kernel modules will likely never happen for the reasons mentioned, though it would be pretty cool :). There's some technical details on how WSL works if you are interested on our blog - https://blogs.msdn.microsoft.com/wsl/. I'm going to close this out for now for the reasons discussed. |
thank you all for explanation of why is it not a goal at the present. |
|
This submission was the landing zone for kernel modules in WSL1, and at the time was punted to the now defunct UserVoice. Kernel modules are available in WSL2, although you'll have to off-road it as of this writing. |
It is worth noting that specific modules should be workable trivially in despite of the differences of kernels, albeit still not implementable in the userland, e.g. |
In my opinion I've running more machines with Ubuntu and one has got the msr working and one not. I do not really find the difference of the systems as both are using the same kernel version and the same release. The strange difference is the benchmark for hashes. The one system that is able to use msr does it with more than twice the speed and this looks like someone want to make ubuntu and linux slow. I had only just now not the time to find the difference to get out what is different in the both systems. As with a quick view they are both the same. Am I'm right with understanding WSL is some kind of a name for Windows? Because than I would understand this breaking down the speed to make Windows more important. |
As I somehow always end in this issue when searching for "kernel modules in wsl2"... Side note: Would it be possible to built-in the msr module (instead of loading it dynamically; which is at least my understanding how other modules are currently handled in the distributed WSL2 kernel)? |
Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!
A brief description
There is no support for loading native linux modules nor support to rebuild from source and load under microsoft wsl
Expected results
modprobe should return success exit code
Actual results (with terminal output if applicable)
modprobe returns error:
ubuntu@wsl:~$ modprobe zfs
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-43-Microsoft
/modules.dep.bin'
modprobe: FATAL: Module zfs not found in directory /lib/modules/4.4.0-43-Microsoft
Your Windows build number
10.0.15063
Steps / All commands required to reproduce the error from a brand new installation
turn on WSL/bash on windows
Strace of the failing command
no need to strace, devs knows well that this is a feature request and not a bug
Required packages and commands to install
none, default packages
See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: