I successfully used Séb’s instructions to install WSL in a Windows 10 virtual machine in VirtualBox, but I then failed to upgrade it to WSL2.
WSL2 runs in a virtual machine, so for this to work in a Windows 10 VM, nested virtualization needs to be enabled. I did enable it in my VM’s configuration, but this didn’t seem to make a difference.
I know others have had better luck using kvm and virt-manager. I’ll continue poking at it when I get a chance, in the meantime if anyone has encountered the same problem and has managed to solve it, I’m all ears!
@saviq kindly pointed out that VirtualBox’s support for nested virtualization is currently limited to AMD CPUs. No luck with my Intel CPU, I’ll give kvm a try.
Is there someone who got WSL2 on the kvm of 18.04 host?
I’m getting the message below when trying install linux distribution on WSL2.
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370109
Error: 0x80370109 ?? ?? ?? ?????? ??? ?? ??? ??? ?? ??? ???????.
Press any key to continue...
@oSoMoN Could you share a working libvirt XML for the KVM/QEMU setup? I got Hyper-V to install inside the VM but wsl2 only returns an error on startup.
I have wsl 1 running on a windows virtual machine with kubuntu 20.04 as host and i am using virtualbox 6.1, which supports intel nested virtualization. i have also enabled nested virtualisation and when i use wsl 1 to check it, i get positive rsults but when converting to wsl 2, it tells me to enbale virtual machine platfrom feature and enable virtualisation when i have already enabled the feature and nested virtualisation and also have enabled hypervisor platform feature… Pls help??
To my knowledge Hyper-V (and thus WSL 2) does not work nested in Virtual Box, which is a type 2 hypervisor. I would recommend using a KVM-based solution instead.