I've got a Windows VM that I am using for testing in lieu of a real WIndows machine. I'd like to enable WSL2 inside that VM.
So far I've:
options kvm-intel nested=1sudo cat /sys/module/kvm_intel/parameters/nested outputs "Y".<cpu model='host-passthrough'> in virt-manager's xml config.Still no dice. As soon as I enable "Virtual Machine Platform" feature, as required for WSL2, my VM starts freezing on boot.
Has anyone managed to do this successfully?
The answer here - to pass through specific flags that make Windows think it is on the metal, but can do nested virt, saved the day for me:
https://superuser.com/a/1589286/916009 - please note this link was posted by @JCallicoat - just saying it should be the answer
cpu definition in your virtual machine emu like so:
<cpu mode="custom" match="exact" check="partial">
<model fallback="allow">Skylake-Client-noTSX-IBRS</model>
<feature policy="disable" name="hypervisor"/>
<feature policy="require" name="vmx"/>
</cpu>