How to Set Up Nested Virtualization in Proxmox

Testing a multi-node Proxmox cluster setup, practicing Kubernetes cluster configuration, or experimenting with another hypervisor entirely usually means ne…

Nested

Testing a multi-node Proxmox cluster setup, practicing Kubernetes cluster configuration, or experimenting with another hypervisor entirely usually means needing multiple physical machines — or does it. Nested virtualization in Proxmox lets you run a hypervisor inside a VM that’s itself running on Proxmox, giving you a genuinely functional test environment without needing additional physical hardware at all.

What Is Nested Virtualization?

Nested virtualization means running a hypervisor (or virtualization-dependent software) inside a virtual machine, which itself runs on a physical host’s hypervisor. In Proxmox’s case, this typically means running Proxmox itself, or another hypervisor, inside a VM on your existing Proxmox host — the inner VM’s own VMs run truly virtualized, one layer deeper than typical.

Why This Is Useful for a Home Lab

  • Testing cluster configurations safely – practice the High Availability and clustering concepts covered in earlier guides without needing three really separate physical machines
  • Safely testing risky changes – experiment with Proxmox upgrades, network reconfigurations, or unfamiliar settings inside a nested, disposable environment before applying changes to your real infrastructure
  • Learning and certification practice – build hands-on familiarity with multi-node setups, migration, and clustering entirely within your existing single-host homelab
  • Running other hypervisors for comparison – test VMware ESXi or another platform inside a VM, without dedicating separate physical hardware to it

Enabling Nested Virtualization

This requires enabling nested virtualization support at the kernel module level on your Proxmox host itself.

For Intel CPUs, check current status:

cat /sys/module/kvm_intel/parameters/nested

If it shows N, enable it:

echo "options kvm-intel nested=1" | sudo tee /etc/modprobe.d/kvm-intel.conf

For AMD CPUs:

cat /sys/module/kvm_amd/parameters/nested

Enable if needed:

echo "options kvm-amd nested=1" | sudo tee /etc/modprobe.d/kvm-amd.conf

Reboot the Proxmox host to apply the module configuration change.

Configuring the VM for Nested Virtualization

Beyond the host-level kernel module setting, the specific VM that will itself run virtualized workloads needs its CPU type configured to expose virtualization extensions to the guest:

  1. In the VM’s Hardware → Processor settings, set the CPU Type to host (passing through your physical CPU’s actual features, including virtualization extensions) rather than a generic emulated CPU type.
  2. Save and start (or restart) the VM.

Verifying Nested Virtualization Works Inside the VM

Once booted, check inside the guest VM itself (which will run its own hypervisor):

egrep -c '(vmx|svm)' /proc/cpuinfo

A result greater than 0 confirms the guest VM can see virtualization extensions and should be able to run its own nested VMs successfully.

Installing Proxmox Inside a Proxmox VM

With nested virtualization confirmed working, you can install Proxmox VE itself inside a VM exactly as you would on physical hardware — boot from the Proxmox ISO within the VM, complete the installer, and you now have a actually functional nested Proxmox instance capable of running its own VMs, useful for testing cluster formation with multiple nested Proxmox VMs all running on your single physical host.

Performance Expectations

Nested virtualization carries real performance overhead — each additional virtualization layer adds overhead, meaning a nested VM’s own VMs run noticeably slower than they would on bare metal or even a single layer of virtualization. This makes nested setups excellent for functional testing and learning, but particularly unsuitable for any production workload or performance-sensitive testing.

Common Use Case: Testing HA and Clustering

Combining nested virtualization with the High Availability concepts , you can create three nested Proxmox VMs on a single physical host, join them into a nested cluster, and practice quorum behavior, live migration, and failover scenarios entirely within a disposable, easily reset testing environment — invaluable practice before attempting the same configuration on real, physically separate cluster nodes.

Cleaning Up After Testing

Since nested VMs are purely for testing and learning, they can be freely deleted once you’re done experimenting, with zero impact on your actual production homelab services running as normal, non-nested VMs on the same host.

Final Thoughts

Setting up nested virtualization in Proxmox turns a single physical homelab host into a truly capable testing ground for multi-node concepts — clustering, HA, migration — that would otherwise require additional physical hardware to practice safely. While the performance overhead makes it unsuitable for anything beyond testing and learning, it’s an invaluable tool for building confidence with advanced Proxmox concepts before applying them to real infrastructure.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *