Here is a cloud computing feature that may seem a bit odd at first but that does actually have its uses. Google’s Compute Engine today launched the beta of a new feature called “nested virtualization.” As the name implies, this essentially allows you to run VMs inside of VMs.
But why would you want to do that? “Nested virtualization makes it easier for enterprise users to move their on-premises, virtualized workloads to the cloud without having to import and convert VM images,” Compute Engine product manager Scott Van Woudenberg writes in today’s announcement. “Dev/test and CI/CD workloads that need to validate software in multiple environments are a good match for nested virtualization.”
He also argues that this is a useful feature for building cheaper cloud-based disaster recovery solutions and that it’ll be useful for companies that want to set up virtual environments for training and certification, where you want to make sure that everybody gets the same environment to work from.
This new feature is available for virtually any type of Compute Engine VM, including preemptible VMs. The only requirement is that the VM has to run on an Intel Haswell or newer CPU.
The way this works practically is that you set up a regular VM and then install a KVM-compatible hypervisor on that instance. Google notes that it doesn’t currently support non-KVM hypervisors like Xen, ESX and Microsoft’s Hyper-V. This only works for Linux instances, though. Nested virtualization isn’t available for Windows machines.
It’s worth noting that Microsoft Azure already supported nested virtualization (using the Hyper-V hypervisor). On AWS, developers can use tools like Oracle’s Ravello nested hypervisor to achieve the same capabilities.