Virtualisation

What is Nested virtualisation?

Definition

Nested virtualisation lets a virtual machine itself run virtual machines, by exposing the processor virtualisation extensions to the guest. It is required for Proxmox VE, VM-based CI jobs and some Docker configurations. Many providers disable it, which is the usual reason those workloads fail elsewhere.

Why Nested virtualisation matters

It is required for Proxmox VE, VM-based CI jobs and some Docker configurations. Many providers disable it, which is the usual reason those workloads fail elsewhere.

Nested virtualisation in practice

When you run nested virtualisation, you boot a hypervisor inside a KVM guest and pass the host CPU's virtualisation extensions through. You will check /proc/cpuinfo in the guest for svm or vmx flags. If they are absent, your inner hypervisor falls back to software emulation, which can cut performance by an order of magnitude. You may also need to enable 'host' CPU type rather than a generic model to get those flags. Get it wrong and your Proxmox or CI workload crawls.

What people get wrong about Nested virtualisation

People assume nested virtualisation only matters for running full OSes like Windows in a VM. The correction: it also breaks Docker's default overlay networking and certain kernel modules, because those depend on virtualisation features inside the guest. So a container workload can fail on a provider that disables nesting, even though you never intended to run a VM.

Nested virtualisation — common questions

Can I run Docker inside a nested VM?

Yes, and this is the most common reason people need nested virtualisation. Docker's default bridge networking uses iptables and kernel modules that may behave differently without CPU virtualisation extensions exposed. Our KVM plans include nested virtualisation, so your Docker containers run as expected.

How do I check if nested virtualisation is enabled?

Inside your VM, run grep -E '(svm|vmx)' /proc/cpuinfo. If you see the flags, nesting is available. If not, the hypervisor is not exposing them, which usually means the provider disabled it.

More from virtualisation

KVM
KVM is full hardware virtualisation built into the Linux kernel, giving each guest its own kernel and hardware-enforced isolation from other tenants.
OpenVZ
OpenVZ is container-based virtualisation in which every instance shares the host kernel, so guests cannot load kernel modules or run a different operating system.
LXC
LXC is Linux-native containerisation that isolates processes with namespaces and cgroups while sharing the host kernel.
Hypervisor
A hypervisor is the software layer that creates and runs virtual machines, allocating physical CPU, memory and IO between them.
vCPU
A vCPU is a virtual processor presented to a guest, backed by scheduling time on a physical core or thread.
cloud-init
cloud-init is the standard mechanism for configuring a virtual machine on first boot, using metadata supplied by the platform.