Windows 10, WSL2 enable KVM nested virtualisation on AMD

Hello all,

I’ve been following L1 on youtube for a long time now, though this is my first time on the forum. Google and Reddit haven’t been able to solve my issue but I think that here will be the best place to ask for help.

This is really a Linux question I just happen to be using WSL2 on Windows 10 (though, this could contribute to the problem I have).

I’m running Windows 10 19043 on an AMD 5800X / ASRock X470 Taichi Ultimate (latest BIOS 4.70). I have IOMMU and SVM enabled - I can run WSL2 and Hyper-V VMs.

I’ve been following this guide to get KVM nested virtualisation working on WSL2 - it’s targeted at Intel processors but I believe it should also work for AMD systems too.

…which points to this guide:

The kernel that I have built has AMD KVM support and KVM Linux guest support. I’ve chosen to keep KVM in the kernel rather than build it as a module.
For this reason I have the commandline flags in my .wslconfig. I believe I have correctly modified them for AMD.

Guide:

kernelCommandLine=intel_iommu=on iommu=pt kvm.ignore_msrs=1 kvm-intel.nested=1 kvm-intel.ept=1 kvm-intel.emulate_invalid_guest_state=0 kvm-intel.enable_shadow_vmcs=1 kvm-intel.enable_apicv=1

My version:

kernelCommandLine=amd_iommu=on iommu=pt kvm.ignore_msrs=1 kvm-amd.nested=1 kvm-amd.ept=1 kvm-amd.emulate_invalid_guest_state=0 kvm-amd.enable_shadow_vmcs=1 kvm-amd.enable_apicv=1

I am definitely running the kernel that I have built and dmesg in WSL shows nested virtualisation is not working:

[    0.151804] kvm: no hardware support
[    0.151804] has_svm: svm not available
[    0.151805] kvm: no hardware support 

Does anyone have any experience with AMD nested virtualisation (vitrualization) or has this working?

From what I can find, nested virtualization on AMD was only ever supported on dev/insider builds of Windows 10. Windows 10 21H1 (19043) never received support for it.

Microsoft’s Hyper-V nested virtualization prerequisites on AMD require the host OS to be Windows 2022 or Windows 11. So I would imagine the same applies to KVM/QEMU hypervisors.

Since my account is brand new I can’t post links yet. So Google search “Run Hyper-V in a Virtual Machine with Nested Virtualization” and check out the prerequisites section.

Thanks! I guess I was being dumb.

I have this working now I’ve upgraded to Windows 11

Any update on this?
Any W10 version that supports AMD virtualization?
I am able to enable it in W10, but cripples performance and I don’t want to install W11 atm.