I'm trying to enable KVM on WSL2 on Windows 10 x64 bit. I've found this tutorial and I'm following it :
https://gist.github.com/offlinehacker/b1d96515f87a47bd0b0bea574eab5583
I've cloned and compiled the WSL2 kernel on a vmware VM with this command as suggested by the tutorial :
make KCONFIG_CONFIG=Microsoft/config-wsl -j8
It reached the end without errors and the vmlinux file has been produced. So,according with the instructions,I have placed it on /users/marietto2020/ with the other file .wslconfig. So,I went on with the instructions,like that :
1) Copy run-wsl.bat, attach.wdbg and patch_wsl_nested.js to same folder
2) Fix path in attach.wdbg
3) Open admin powershell in that folder
4) Run ./run-wsl.bat and follow instructions
and this is what happened :
ziomario@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/b1$ kvm-okINFO: /dev/kvm does not existHINT: sudo modprobe kvm_intelINFO: For more detailed results, you should run this as rootHINT: sudo /usr/sbin/kvm-okziomario@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/b1$ suPassword:root@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/b1# kvm-okINFO: /dev/kvm does not existHINT: sudo modprobe kvm_intelmodprobe: FATAL: Module msr not found in directory /lib/modules/4.19.84-microsoft-standard+root@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/b1# sudo modprobe kvm_intelmodprobe: FATAL: Module kvm_intel not found in directory /lib/modules/4.19.84-microsoft-standard+root@DESKTOP-N9UN2H3:/lib/modules/4.19.84-microsoft-standard+# cp /mnt/c/Users/marietto2020/Desktop/WSL/WSL/Ubuntu-KVM/WSL2-Linux-Kernel/arch/x86/kvm/* /lib/modules/4.19.84-microsoft-standard+root@DESKTOP-N9UN2H3:/lib/modules/4.19.84-microsoft-standard+# ls /lib/modules/4.19.84-microsoft-standard+kvm-amd.ko kvm-intel.ko kvm.koroot@DESKTOP-N9UN2H3:/lib/modules/4.19.84-microsoft-standard+# sudo modprobe kvm_intelmodprobe: FATAL: Module kvm_intel not found in directory /lib/modules/4.19.84-microsoft-standard+
IT IS NOT RECOGNIZED ! do u know the reason ?