What is nested virtualization?

Nested virtualization runs a virtual machine inside another virtual machine. The cloud must pass processor virtualization features, such as Intel VT-x, to the outer machine.

Updated

Why a microVM platform needs it

A microVM runs on KVM. Firecracker "relies on KVM and on the processor virtualization features for workload isolation." When the host is a cloud VM, the microVM runs one level deeper. That is nested virtualization.

Which clouds support it

  • AWS: Nested virtualization works on selected EC2 instance types, such as M7i, C7i and R7i. AWS lists KVM and Hyper-V as supported hypervisors. It has no extra cost. Check the current list with describe-instance-types.
  • Google Cloud: Nested virtualization is not available on E2 VMs, memory-optimized VMs, or ARM VMs. AMD VMs are excluded, except N4D. The only hypervisor supported in the outer VM is Linux KVM.
  • Azure: The default Trusted launch security type blocks nested virtualization. Set the security type to Standard. Microsoft's troubleshooting guide uses the Dv3 and Dv4 series as examples.

Performance cost

Google Cloud warns that "nested VMs might experience a 10% or greater decrease in performance" for CPU-bound work. AWS advises users with performance-sensitive workloads to evaluate bare metal instances.

What to check

  • Whether a provider runs its microVMs on bare metal, or on nested virtualization in a cloud VM.
  • How much CPU speed the provider gives up, if it states a number.

Related terms

All glossary terms

Related