EC2 now officially supports nested virtualization.
The feature is available in all AWS commercial regions; at present it is offered on three Intel-based instance families: C8i, M8i and R8i. It provides a choice between KVM and Hyper-V. With a few caveats, including:
- No instance hibernation
- Virtual Secure Mode (VSM) is disabled on Windows instances
- No support for Windows instances with more than 192 CPUs
Nested virtualization serves as a cost-effective alternative to bare metal for running micro-VMs (for example, via AWS Firecracker, which requires KVM) or for development and software testing tools—WSL2, emulators, CI/CD pipelines that manipulate VM images…
Nested virtualization, first appearing on Azure and Google Cloud in 2017
Integrated into Windows Server 2022, nested virtualization was introduced on Azure in 2017. It officially supports only Hyper-V, on Intel processors with VT-x extensions as well as on AMD’s EPYC and Ryzen CPUs. Among other limitations, it does not support dynamic memory (you must power off the host VM to adjust its memory).
Google began incorporating nested virtualization into its public cloud in 2017 as well, based on KVM. Initially, it targeted Linux VMs running on Intel Haswell-generation processors and later. It is now generalized, but still not supported on AMD or ARM processors—and not usable with E2 and H4D VMs, as well as memory-optimized instances.
Google offers an estimate of the overhead introduced by nested virtualization. It anticipates at least a 10% performance drop for CPU-bound workloads, and potentially more for workloads oriented toward I/O.
AWS appears to have waited for hardware capable of minimizing these losses… and to ensure the level of security aligned with its standards.
OCI also supports nested virtualization, based on KVM.