how to fix "Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS."

Arunkumar Venkatesan 110 Reputation points
2024-02-20T17:34:22.4933333+00:00

I am trying to run wsl. I am getting this error. User's image

Please help.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,365 questions
{count} vote

Accepted answer
  1. TP 81,381 Reputation points
    2024-02-21T16:08:39.98+00:00

    Hi Arunkumar,

    In the portal, please verify that the VM was created with Standard security. You can check this on the Overview tab, scroll down and look for Security type: Standard.

    azure security type standard overview tab

    For VM sizes less than v5 you need to select Standard because Nested Virtualization isn't supported with Trusted Launch.

    If the security type isn't Standard then you need to re-create your VM with Standard security. Be careful because when you change certain options on Basics tab it can change security type back to Trusted Launch even though you already switched it to Standard, so you may need to change the dropdown again.

    azure security type standard 2016 server

    Please click Accept Answer and upvote if the above was useful. If you still need assistance please add a comment below.

    Thanks.

    -TP

    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 59,036 Reputation points
    2024-02-20T17:41:28.2533333+00:00

    Wsl uses windows virtual machine support. Your bios must have support and you must install the windows virtual platform feature. See:

    https://support.microsoft.com/en-us/windows/enable-virtualization-on-windows-11-pcs-c5578302-6e43-4b4b-a449-8ced115f58e1

    1 person found this answer helpful.

  2. kobulloc-MSFT 25,061 Reputation points Microsoft Employee
    2024-02-22T00:31:42.8733333+00:00

    Hello, @Arunkumar Venkatesan ! We received your feedback and want to make sure that your question has been addressed.

    How do I resolve Windows Subsystem for Linux (WSL) Error: 0x80370102 on an Azure VM?

    You can find the complete troubleshooting checklist for this issue in the WSL troubleshooting documentation:

    https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80370102-the-virtual-machine-could-not-be-started-because-a-required-feature-is-not-installed

    In line with what @TP has said, there are two requirements that I would highlight from this list:

    • If your machine is a VM, enable nested virtualization manually. Launch powershell with admin, and run the following command, replacing <VMName> with the name of the virtual machine on your host system (you can find the name in your Hyper-V Manager):
      Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
    • If you are receiving this error on an Azure Virtual Machine, check to ensure that Trusted Launch is disabled. Nested Virtualization is not supported on Azure virtual machines.

    Also confirm that the VM you have selected is capable of running nested virtualization:

    https://learn.microsoft.com/en-us/azure/virtual-machines/acu

    Complete troubleshooting list: Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.

    1. Check the Hyper-V system requirements
    2. If your machine is a VM, enable nested virtualization manually. Launch powershell with admin, and run the following command, replacing <VMName> with the name of the virtual machine on your host system (you can find the name in your Hyper-V Manager):
      Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
    3. Please follow guidelines from your PC's manufacturer on how to enable virtualization. In general, this can involve using the system BIOS to ensure that these features are enabled on your CPU. Instructions for this process can vary from machine to machine, please see this article from Bleeping Computer for an example.
    4. Restart your machine after enabling the Virtual Machine Platform optional component.
    5. Make sure that the hypervisor launch is enabled in your boot configuration. You can validate this by running (elevated powershell): bcdedit /enum | findstr -i hypervisorlaunchtype If you see hypervisorlaunchtype Off, then the hypervisor is disabled. To enable it run in an elevated powershell:
      bcdedit /set hypervisorlaunchtype Auto
    6. Additionally, if you have 3rd party hypervisors installed (Such as VMware or VirtualBox) then please ensure you have these on the latest versions which can support HyperV (VMware 15.5.5+ and VirtualBox 6+) or are turned off.
    7. If you are receiving this error on an Azure Virtual Machine, check to ensure that Trusted Launch is disabled. Nested Virtualization is not supported on Azure virtual machines.

    Learn more about how to Configure Nested Virtualization when running Hyper-V in a Virtual Machine.


    I hope this has been helpful! Your feedback is important so please let us know that your issue has been addressed by accepting an answer. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A! User's image

    0 comments No comments