AZ-800 Administering Windows Server Hybrid Core Infrastructure Exam

Eager to master hybrid server management? Discover how to administer Windows Server Hybrid Core Infrastructure on Azure, setting your path towards the Microsoft Certified: Azure Hybrid Infrastructure Administrator Associate certification!

Practice Test

Intermediate
Exam

Enable nested virtualization

Prepare the Azure VM Host for Nested Virtualization

Nested virtualization is the ability to run a Hyper-V virtual machine inside another Hyper-V VM. In Azure, you must choose a VM generation and size that supports nested virtualization. Typically, this means selecting sizes labeled Large (nested virtualization) or Medium (nested virtualization). Choosing the correct VM ensures the host exposes processor features like Intel VT-x or AMD-V to guest VMs.

Before you enable nested virtualization, confirm you have the necessary Azure subscription and the right permissions. You need one of the following Azure RBAC roles:

  • Lab Creator
  • Owner
  • Contributor
  • Lab Services Contributor

Also make sure you have an active lab plan set up in Azure Lab Services. These prerequisites guarantee you can modify VM settings and apply the required configuration.

To enable nested virtualization, you install and configure the Hyper-V role on your Azure VM host. Follow these steps:

  1. Connect to the VM via Remote Desktop (RDP).
  2. Open PowerShell as an administrator.
  3. Change the execution policy by running Set-ExecutionPolicy Bypass -Force.
  4. Download and run the setup script:
    • Invoke-WebRequest 'https://aka.ms/azlabs/scripts/hyperV-powershell' -OutFile SetupForNestedVirtualization.ps1
    • .\SetupForNestedVirtualization.ps1
  5. Restart the VM if prompted and rerun the script until it completes.
  6. Reset the execution policy with Set-ExecutionPolicy Default -Force.

Enabling nested virtualization unlocks several key benefits. You can:

  • Test software in isolated environments by running emulators or preview releases.
  • Build training labs faster since nested VMs are pre-configured.
  • Use Hyper-V isolation for containers to boost security and compatibility.

However, there are some limitations to keep in mind:

  • Only Hyper-V is supported; other virtualization platforms won’t run in a nested setup.
  • You cannot change dynamic memory settings while the VM is running; the VM must be off to adjust memory.
  • Nested nested environments can impact performance, so plan resource allocation carefully.

Conclusion

This section covered how to prepare an Azure VM host for nested virtualization by selecting a supported VM size, meeting essential prerequisites, and configuring the Hyper-V role with PowerShell. You learned the step-by-step process to enable nested virtualization and understood its primary benefits for testing, training, and container isolation. Finally, you saw the limitations around supported hypervisors and memory settings. With these concepts, you can confidently set up and validate nested virtualization environments in Azure.