Virtualisation
What is Nested virtualisation?
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.
Where Nested virtualisation comes up
- Can I run nested virtualisation on a VPS? Yes. Nested virtualisation is enabled on every OnionVPS instance, so you can run KVM guests inside your instance, install Proxmox VE, or run Docker-in-Dock…
- What is the cheapest VPS that is actually usable? About $4 a month buys 1 vCPU, 1 GB of RAM and 20 GB of NVMe on real KVM virtualisation. That is genuinely enough for a WireGuard VPN, a DNS resolver, a Tor…
- What is KVM virtualisation? KVM (Kernel-based Virtual Machine) is full hardware virtualisation built into the Linux kernel, using processor extensions to run each guest with its own k…
- KVM vs OpenVZ: why the virtualisation type matters KVM is full hardware virtualisation: your instance runs its own kernel and cannot see the host. OpenVZ and LXC are container technologies that share the ho…
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.