致命:当我尝试在Windows 10的WSL上启用KVM时,在目录/lib/modules/4.19.84-microsoft-standard+中找不到模块kvm_intel

我正在尝试在Windows 10 x64位的WSL2上启用KVM。我已经找到了本教程,并且正在关注它:

https://gist.github.com/offlinehacker/b1d96515f87a47bd0b0bea574eab5583

我已经按照本教程的建议使用此命令在vmware VM上克隆并编译了WSL2内核:

使KCONFIG_CONFIG = Microsoft / config-wsl -j8

它到达最后没有错误,并且已生成vmlinux文件。因此,根据说明,我将其与其他文件.wslconfig放在/ users / marietto2020 /上。所以,我继续这样的指示:

1)将run-wsl.bat,attach.wdbg和patch_wsl_nested.js复制到同一文件夹

2)修复attach.wdbg中的路径

3)在该文件夹中打开admin powershell

4)运行./run-wsl.bat并按照说明进行操作

这就是发生的事情:

ziomario@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/b1$ kvm-ok
INFO: /dev/kvm does not exist
HINT:   sudo modprobe kvm_intel
INFO: For more detailed results, you should run this as root
HINT:   sudo /usr/sbin/kvm-ok


ziomario@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/b1$ su
Password:


root@DESKTOP-N9UN2H3:/mnt/c/Users/marietto2020/Desktop/WSL/b1# kvm-ok
INFO: /dev/kvm does not exist
HINT:   sudo modprobe kvm_intel
modprobe: 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_intel
modprobe: 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+
Kconfig    emulate.o  i8259.o     irq_comm.o       kvm-intel.o       lapic.c      modules.order  pmu.o        tss.h
Makefile   hyperv.c   ioapic.c    kvm-amd.ko       kvm.ko            lapic.h      mtrr.c         pmu_amd.c    vmx.c
cpuid.c    hyperv.h   ioapic.h    kvm-amd.mod.c    kvm.mod.c         lapic.o      mtrr.o         pmu_amd.o    vmx.o
cpuid.h    hyperv.o   ioapic.o    kvm-amd.mod.o    kvm.mod.o         mmu.c        page_track.c   pmu_intel.c  vmx_evmcs.h
cpuid.o    i8254.c    irq.c       kvm-amd.o        kvm.o             mmu.h        page_track.o   pmu_intel.o  vmx_shadow_fields.h
debugfs.c  i8254.h    irq.h       kvm-intel.ko     kvm_amd.ko        mmu.o        paging_tmpl.h  svm.c        x86.c
debugfs.o  i8254.o    irq.o       kvm-intel.mod.c  kvm_cache_regs.h  mmu_audit.c  pmu.c          svm.o        x86.h
emulate.c  i8259.c    irq_comm.c  kvm-intel.mod.o  kvm_intel.ko      mmutrace.h   pmu.h          trace.h      x86.o


root@DESKTOP-N9UN2H3:/lib/modules/4.19.84-microsoft-standard+# sudo modprobe kvm_intel
modprobe: FATAL: Module kvm_intel not found in directory /lib/modules/4.19.84-microsoft-standard+

无法识别!你知道原因吗?

评论