Issue
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:
- Upgraded Windows to v2004.
- Enabled nested virtualization in kvm-intel kernel module via
options kvm-intel nested=1 - Made sure that
sudo cat /sys/module/kvm_intel/parameters/nestedoutputs "Y". - Set
<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?
Solution
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>
Answered By - Mike Hardy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.