Closed Baitoven closed 4 months ago
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.
@Baitoven your WSL version is older, but on 2.2.2
and kernel 5.15.150.1-microsoft-standard-WSL2
nested virtualization is available:
root@texas:~# kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
and from dmesg
output:
[ 0.394474] KVM: vmx: using Hyper-V Enlightened VMCS
[ 0.426816] kvm: already loaded the other module
kvm
module info:
root@texas:~# modinfo kvm
name: kvm
filename: (builtin)
license: GPL
file: arch/x86/kvm/kvm
author: Qumranet
parm: tdp_mmu:bool
parm: mmio_caching:bool
parm: nx_huge_pages:bool
parm: nx_huge_pages_recovery_ratio:uint
parm: flush_on_reuse:bool
parm: ignore_msrs:bool
parm: report_ignored_msrs:bool
parm: min_timer_period_us:uint
parm: kvmclock_periodic_sync:bool
parm: tsc_tolerance_ppm:uint
parm: lapic_timer_advance_ns:int
parm: vector_hashing:bool
parm: enable_vmware_backdoor:bool
parm: force_emulation_prefix:bool
parm: pi_inject_timer:bint
parm: mitigate_smt_rsb:bool
parm: halt_poll_ns:uint
parm: halt_poll_ns_grow:uint
parm: halt_poll_ns_grow_start:uint
parm: halt_poll_ns_shrink:uint
@elsaco I don't feel like my issue is version related, tbh. I've tried today to update to WSL v2.2.2, which did not change anything. In my opinion, the issue is hardware related : somehow virtualization features from my CPU are not handled by WSL (but are by Windows, since WSL is working)
WslLogs-2024-04-16_08-41-55.zip New logs removing previous logs unexpected format
@Baitoven you might have to install Hyper-V
in order to use nested virtualization inside WSL.
@zcobol nested virtualization in WSL2 is supposed to use KVM to run, not HyperV. In my knowledge KVM does not use HyperV and HyperV might even cause some issues. I've already tried enabling HyperV on Windows side, but it does not seem to change anything.
@Baitoven You're using Win10 and for nested virtualization in WSL you need Win11. See https://learn.microsoft.com/en-us/windows/wsl/wsl-config for details.
nestedVirtualization | boolean* | true | Boolean to turn on or off nested virtualization, enabling other nested VMs to run inside WSL 2. Only available for Windows 11.
@zcobol alright. As simple as that. Thanks for that I was indeed missing this piece of information.
Windows Version
Microsoft Windows version 10.0.19045.4291
WSL Version
2.2.2
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.150.1-microsoft-standard-WSL2
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Windows 10 lastest release with Intel i5 13600KF (on MSI PRO Z790-P WIFI Motherboard) BIOS Updated to latest firmware (7E06vAC1(Beta version)) from 2024-02-27 Intel VT-x and VT-d enabled in BIOS. Virtualization shown as enabled in Windows Task manager. Start WSL from powershell:
wsl: nested virtualization is not supported on this computer
is displayed.Expected Behavior
Running
sudo kvm-ok
inside WSL should return that everything is ok, and it's not.Actual Behavior
Running
sudo kvm-ok
inside WSL returnsINFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used
Diagnostic Logs
WslLogs-2024-04-15_16-23-34.zip