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

  1. Add to ~/etc/wsl.conf or~ %UserProfile%\.wslconfig as documented here
[wsl2]
nestedVirtualization=true
  1. Restart wsl

Expected Behavior

  1. wsl2.nestedVirtualization setting works
  2. /dev/kvm exists

Actual Behavior

  1. /dev/kvm does not exist
  2. 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)

Most upvoted comments

@andyneff you loaded the kvm module, but the processor specific module needs to be loaded also. On my system it’s kvm_intel. For AMD processors kvm_amd is needed.

In WSL-2.5.1 the modules were moved to a separate virtual drive, so make sure your modules are loaded properly on startup.