WSL 2: Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS

You need to enable the Virtual Machine Platform Windows feature to use WSL 2. If this is not done, then you will get the following error:

wsl --set-version kali-linux 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.

To enable WSL 2, Open the Windows Features window by navigating to Control Panel | Programs | Turn Windows feature on or off.

Enable the Virtual Machine Platform Windows feature
Enable the Virtual Machine Platform Windows feature

Ensure that the Virtual Machine Platform and Windows Subsystem for Linux features are selected.

After clicking on the OK button, Windows will enable WSL 2.

If you want to install WSL 2 on a Windows 10 virtual machine, the virtual machine should support nested virtualization.

With VirtualBox, right-click the VM and choose Settings. In the System section, under the Processor tab, check the box: Enable Nested VT-x/AMD-V.

Enable nested virtualization on VirtualBox
Enable nested virtualization on VirtualBox

On VMware Workstation, right-click the VM and choose Settings. In the Hardware section, under the Processor, make sure the Virtualize Intel VT-x/EPT or AMD-V/RVI checkbox is enabled.

Enable nested virtualization on VMware Workstation
Enable nested virtualization on VMware Workstation

You also have to make sure virtualization is enabled in the BIOS (Intel Virtualization Technology or SVM Mode in AMD).