Not able to run WSL2 on an Azure VM (Standard D8s v3 (8 vcpus, 32 GiB memory)) -

Mike Hingley 5 Reputation points
2023-06-21T10:35:07.2166667+00:00

I span up a VM to run some workload using WSL2. I have previously had similar machines and had no problems setting up WSL2 - but for some reason, attempting to run WSL throws the following error :
Error Message from VM - Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.

The Virtual Machine Platform feature is enabled - yet I still get the error - which I understand is due to the VM not supporting Nested Virtualisation - however I believe this machine is supposed to support this :
Details of DSv3 machines

Anyone got any ideas what I've done wrong here?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,065 questions
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2023-06-21T17:41:02.6+00:00

    @Mike Hingley

    I can see you are getting the error on your Azure VM:

    WslRegisterDistribution failed with error: 0x80370102
    Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
    For information please visit https://aka.ms/enablevirtualization
    

    Likely the issue you are facing is that Trusted Launch needs to be disabled. Currently Trusted Launch does not support Nested Virtualization. When launching your VM please set the Security Type to Standard, currently the portal enables Trusted Launch by default.

    User's image

    To verify that it works I launched Standard D8s v3 VM and enabled WSL 2 following the instructions here. Launched Powershell and ran "wsl --install".

    enter image description here

    After Reboot: enter image description here

    Hope this helps! Let me know if that is not the issue and we can work with you directly to troubleshoot.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A! User's image

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.