Skip to content

“Nested virtualization is not supported on this machine”, but it works in Hyper-V #11216

Description

Windows Version

Microsoft Windows [Version 10.0.19045.4046]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Other Software

Hyper-V-Manager, Version: 10.0.19041.1

Repro Steps

  1. Create %USERPROFILE%\.wslconfig
    [wsl2]
    nestedVirtualization=true
    
  2. Install the following Features:
    • Hyper-V/*
    • VM-Plattform
    • Windows-Hypervisor-Platform
    • Windows-Subsystem for Linux
  3. Start any distro with WSL

Expected Behavior

Nested virtualization should be working with WSL as long as it is working with Hyper-V. If there are additional requirements not present in Hyper-V, they should be documented.

I tested running Ubuntu in Qemu on NixOS in Hyper-V. I used qemu-system-x86_64 -enable-kvm to lunch Ubuntu within NixOS. Everything worked with reasonable good performance. So, I am sure that nested virtualization actually works on my processor with Hyper-V.

Image showing YT on Ubuntu in Qemu on NixOS in Hyper-V

Actual Behavior

WSL reports the following message (German) before starting the distro:

wsl: Geschachtelte Virtualisierung wird auf diesem Computer nicht unterstützt.

(Translates to “Nested virtualization is not supported on this machine.”)

The distro reports that KVM is not supported,

jojo@DellBox-DESKTOP166:/mnt/c/Users/jojo$ dmesg | grep kvm
[    0.115998] kvm: no hardware support
[    0.116001] kvm: no hardware support

Diagnostic Logs

WslLogs-2024-02-27_23-07-35.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions