Enable Virtualization in windows 10 azure vm

Satyam Chauhan 587 Reputation points
2023-07-11T15:02:47.35+00:00

Hi,

I am using an azure VM, Windows 10 Enterprise, version - 21H2, OS build - 19044.3086.

I am installing WSL2 and installed Ubuntu from windows store on it, for this I enabled nested virtualization using - https://learn.microsoft.com/en-us/azure/lab-services/how-to-enable-nested-virtualization-template-vm-using-script?tabs=powershell

I enabled the Virtual Machine Platform as well from "Turn Windows feature on or off"

When I try to open the ubuntu app it gives following error -

Installing, this may take a few minutes...

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

Press any key to continue...

Using some links I tried to enable Virtualization using the following command, but it gives error, I replaced <My Vm Name> with actual VM name.

PS C:\Windows\system32> Set-VMProcessor -VMName <My Vm Name> -ExposeVirtualizationExtensions $true
Set-VMProcessor : Hyper-V was unable to find a virtual machine with name "provided VM Name".
At line:1 char:1
+ Set-VMProcessor -VMName <VM Name> -ExposeVirtualizationExtensi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Set-VMProcessor], VirtualizationException
    + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.SetVMProcessor

Please help, how can I resolve this issue.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,863 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,135 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,763 questions
{count} votes

Accepted answer
  1. TP 100.2K Reputation points
    2023-07-11T15:07:39.6333333+00:00

    Hi Satyam,

    When creating the VM, please make sure the size you select supports Nested Virtualization and you select Standard security, as shown in screenshot below:

    azure security type standard

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

    Please click Accept Answer if the above was helpful. If the above doesn't resolve the issue please add a comment with more details such as the VM size you selected.

    Thanks.

    -TP

    3 people found this answer helpful.

0 additional answers

Sort by: Most 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.