Skip to content
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

Cannot use qemu and cannot call modprobe kvm-intel on WSL2 #4847

Closed
AuriR opened this issue Jan 26, 2020 · 1 comment
Closed

Cannot use qemu and cannot call modprobe kvm-intel on WSL2 #4847

AuriR opened this issue Jan 26, 2020 · 1 comment
Labels

Comments

@AuriR
Copy link

AuriR commented Jan 26, 2020

I'm attempting to use the following project: https://github.com/foxlet/macOS-Simple-KVM

I've installed all the packages, but cannot run the basic.sh ... I receive the following error from qemu:

$ ./basic.sh
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory

So I looked into what modprobe kvm-intel would return, ensuring that module's installed. Instead, I receive the error:

$ modprobe kvm-intel
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microsoft-standard/modules.dep.bin'
modprobe: FATAL: Module kvm-intel not found in directory /lib/modules/4.19.84-microsoft-standard

Attempting to run basic.sh yields:

It doesn't matter if I sudo.

Navigating to that directory shows it doesn't exist. Is this a WSL2 abstraction silently handled by the OS? Is qemu supported on WSL?

System info below:

OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19041 N/A Build 19041
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Organization: N/A
Product ID: 00330-80000-00000-AA840
Original Install Date: 1/25/2020, 1:33:49 PM
System Boot Time: 1/26/2020, 8:00:02 AM
System Manufacturer: Microsoft Corporation
System Model: Surface Pro 7
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 126 Stepping 5 GenuineIntel ~1298 Mhz
BIOS Version: Microsoft Corporation 8.100.140, 12/20/2019
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC-05:00) Indiana (East)
Total Physical Memory: 15,975 MB
Available Physical Memory: 8,970 MB
Virtual Memory: Max Size: 21,607 MB

Thanks!

@therealkenc
Copy link
Collaborator

therealkenc commented Jan 26, 2020

modprobe: FATAL: Module kvm-intel not found in directory /lib/modules/4.19.84-microsoft-standard

Correct; you don't have any modules for the 4.19.84-microsoft-standard kernel. The modprobe(8) fail reflects this. Kernel modules are compiled into the WSL-Linux-Kernel statically by-design. One can in the hypothetical compile modules for that kernel; I've tried it, and it does work (because real kernel, and why wouldn't it). But even if you did, in this instance, it seems unlikely KVM will fly because you don't have a Linux kernel as the host OS. ['Unlikely' caveat versus 'won't fly' only because I haven't actually tried to watch the fail.] [ed, better] There's some indication of success attempting that in dupe #4193.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants