WSL: /dev/kvm is missing, even with nestedVirtualization set to true
Windows Version
Microsoft Windows [Version 10.0.26100.4652]
WSL Version
WSL version: 2.5.9.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
Kernel version: 6.6.87.2-1
Distro Version
any
Other Software
No response
Repro Steps
- Add to ~
/etc/wsl.confor~%UserProfile%\.wslconfigas documented here
[wsl2]
nestedVirtualization=true
- Restart wsl
Expected Behavior
wsl2.nestedVirtualizationsetting works/dev/kvmexists
Actual Behavior
/dev/kvmdoes not exist- When setting in
.wslconfig, no errors are printed ~3. When setting in/etc/wsl.conf, upon terminating and restarting the specific wsl distro, you get the following error message:~
~wsl: Unknown key ‘wsl2.nestedVirtualization’ in /etc/wsl.conf:7~
Diagnostic Logs
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (2 by maintainers)
@andyneff you loaded the
kvmmodule, but the processor specific module needs to be loaded also. On my system it’skvm_intel. For AMD processorskvm_amdis needed.In
WSL-2.5.1the modules were moved to a separate virtual drive, so make sure your modules are loaded properly on startup.