Create Azure burstable VM with nested virtualization

Bernhard Häussermann 21 Reputation points
2025-07-11T12:47:23.3133333+00:00

We've been running Windows Docker containers in a Windows B2s virtual machine.

Running Docker containers in a VM is known to require nested virtualization so that Hyper-V can be enabled.

We now need to create a new virtual machine in a different subscription. I'm trying to find out how to ensure that the VM will have nested virtualization, but cannot make sense out of it.

As a sanity check, I invoked dism on the existing B2s VM:

powershell Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

FeatureName : Microsoft-Hyper-V
DisplayName : Hyper-V
Description : Hyper-V
RestartRequired : Possible
State : Enabled
CustomProperties :
...

This shows that Hyper-V is enabled, which implies that the VM has nested virtualization.

However, I can find no evidence online that B2s supports nested virtualization. This page explicitly indicates that the Bsv2 size series does not support nested virtualization.

We need burstability and nested virtualization, so we are looking to create a B4s VM to replace the current one, but given that there are a few factors that determine if nested virtualization will be supported (size, region, security setting), I want to ascertain if this VM size supports it.

I'm perplexed due to the fact that our B2s VM has Hyper-V enabled but I can't find any definitive information online that supports this. Neither can I find definitive information with regards to which regions support nested virtualization.

Will someone please point me to the relevant information and help me understand what I'm missing?

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

Answer accepted by question author
  1. Anusree Nashetty 6,470 Reputation points Microsoft External Staff Moderator
    2025-07-14T03:03:48.5866667+00:00

    Hi Bernhard Häussermann,

    Enabling the Hyper-V role in a B2s VM does not mean nested virtualization is functional—while the OS may report Hyper-V as "Enabled," this only confirms that the feature is installed, not that the necessary hardware virtualization extensions (like Intel VT-x or AMD-V) are exposed by the Azure hypervisor. Without these hardware capabilities, you can install the Hyper-V role but cannot run nested virtual machines or containers with Hyper-V isolation.

    B4s is a size in series Bsv2, as per Azure documentation B4s do not support nested virtualization. The B-series is designed for burstable workloads but lacks the required hardware virtualization passthrough for nested virtualization. No burstable series (B2s, B4s, Bsv2, etc.) officially support nested virtualization, regardless of region or security settings

    User's image

    Nested virtualization support is generally available in all regions for supported VM sizes, but there can be exceptions. Always check the Azure portal for SKU availability in your target region.
    Trusted Launch VMs are not compatible with nested virtualization. To enable Nested Virtualization in an Azure VM, make sure to set Security Type as "Standard". Enable nested virtualization
    Azure does not currently offer a VM size that combines both features. You must choose between burstable pricing (B-series) and nested virtualization.

    Some series that support Nested virtualization:
    Dsv6 sizes series Dsv6
    Dlsv6 sizes series Dlsv6
    Dasv6 sizes series dasv6 and some other D series supports nested virtualization.
    F-family and FX-family series supports nested virtualization for all sizes. compute-optimized F & FX family

    Note: You can refer to the Azure documentation for each VM series to verify whether it supports nested virtualization.

    If you have any further queries, let me know. If the information is helpful, please click on Upvote.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bernhard Häussermann 21 Reputation points
    2025-07-14T07:04:57.78+00:00

    Thank you @Anusree Nashetty ,

    You helped me connect the dots!

    I realized that on the existing B2s VM we were in fact not using nested virtualization or Hyper-V. Instead, that VM runs containers using process isolation (I don't actually know how the Hyper-V feature ended up being installed on that VM; on the new VM, installing it fails with the error Hyper-V cannot be installed: The processor does not have the required virtualization capabilities).

    After I had installed Docker Engineon the new B4s VM, I got the error failed to start daemon: failed to load vmcompute.dll, ensure that the Containers feature is installed

    In the "Add Roles and Features Wizard" I expected to find the "Containers" feature on the "Server Roles" step, and didn't realize it only appears on the next step of the wizard of "Features". When I didn't find it under "Server Roles", I thought I had to install "Hyper-V" (this is required for Docker on Windows 10/11, but not on Windows Server).

    I eventually found the script for installing Docker CE on Windows Server in the Microsoft documentation. I can now successfully run Windows containers on the B4s VM!

    0 comments No comments

Your answer

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