I am in a VMware Virtual Desktop and I am trying to convert Ubuntu to WSL2 using wsl --set-version ubuntu 2 but I am getting an error:
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
However I looked in the Windows Features panel and both Windows Subsystem for Linux and Virtual Machine Platform are checked.
I believe as one cause of the error my distro was downloaded not as administrator but as a regular user in PowerShell. If I try wsl -l -v as admin I see no distributions but as user I will see my ubuntu download.
My question is, will I need my distribution to display when running PowerShell as admin in order to use WSL2, and if so is there an easy way to make that happen besides uninstalling my distro entirely?
11 Answer
My question is, will I need my distribution to display when running PowerShell as admin in order to use WSL2
That's really not related to what you're seeing, no. Typically you should install and run your distribution as your normal user.
The problem is more likely related to trying to run WSL2 inside a Windows installation in VMWare. The VMP is a subset of the Hyper-V hypervisor, so you need "Nested Virtualization" in order for it to run inside VMWare.
You'll need:
- A supported CPU, for starters, with Intel VT-x and EPT or AMD-V and RVI.
- A recent Windows release. I know all versions of Windows 11 are supported, but I can't recall exactly when this was added in Windows 10 -- Probably around 21H2.
- A supported VMWare release (see list here.
- Have enabled the "Virtualize Intel VT-x/EPT or AMD-V/RVI" option in VMWare Workstation/Player/Fusion.
If you find that the option isn't available to enable in VMWare, then one of the other requirements probably hasn't been met.