Enable nested virtualization in PVR to test and simulate complex virtual environments. Our Proxmox Support team is ready to assist you.
Nested Virtualization in Proxmox VE
Nested virtualization lets you run a hypervisor inside a virtual machine, enabling VMs within VMs. This helps IT teams, developers, and learners test software, simulate infrastructures, and build training labs without extra hardware.
Read the article completely to learn how it works, why it matters, and how to set it up in Proxmox VE.
Introduction to Nested Virtualization
Nested virtualization is the process of running a hypervisor inside a virtual machine, which itself is hosted on a physical hypervisor. In practice, this means you can create a virtual machine inside another virtual machine. This setup is especially valuable for IT administrators, developers, and learners who want to simulate complex infrastructures, test new software, or train in virtual labs without investing in additional hardware.
With support from leading platforms like Microsoft Hyper-V, VMware ESXi, and Proxmox VE, nested virtualization makes it possible to build multi-layered environments that closely mirror real-world enterprise systems. When combined with hardware features such as Intel VT-x or AMD-V and Second-Level Address Translation (SLAT), it delivers the performance and flexibility needed for modern testing, development, and DevOps workflows.
Why Nested Virtualization is Important
Nested virtualization saves costs and maximizes hardware use by allowing you to test complex systems without extra servers. It helps teams build training labs, run DevOps pipelines, and validate updates or recovery plans in safe environments. This flexibility makes it valuable for both learning and production simulations.
How Nested Virtualization Works
Many IT professionals want to know how nested virtualization actually functions. The process may sound complex, but it follows a clear structure.
First, a physical machine runs a primary hypervisor. This is known as the Level 0 hypervisor, and it takes control of the server hardware to create the first layer of virtual machines.
Next, the primary hypervisor shares important CPU virtualization features, such as Intel VT x or AMD V, with one of its virtual machines. Passing these instructions to the guest system is what makes nested virtualization possible.
Once the virtual machine receives these hardware features, it can install its own hypervisor software. This machine now acts as a secondary hypervisor, often called Level 1.
Finally, the Level 1 hypervisor creates and manages its own guest machines, known as Level 2 virtual machines. These VMs behave just like standard ones, but they run inside another virtualized environment.
This layered design allows administrators and developers to simulate real data centers, build training environments, or test DevOps pipelines without relying on multiple physical servers.
Use Cases of Nested Virtualization
Use Case | How It Helps |
Building Complex Test Beds | Developers simulate multi-layer environments to test apps, operating systems, and automation workflows without additional hardware. |
Hands-On Learning Spaces | IT teams create safe labs where learners can practice virtualization skills and explore system setups. |
Custom Cloud Environments | Cloud providers allow users to design and manage their own virtual infrastructures inside cloud platforms. |
Safe Cybersecurity Research | Security professionals examine malware and conduct penetration testing in isolated VMs without risking the host machine. |
How to Check Virtualization Support in Proxmox VE
Before enabling nested virtualization in Proxmox VE, you need to confirm that your CPU supports the required virtualization extensions. Follow these steps:
- Enable CPU Virtualization in BIOS or UEFI
Make sure Intel VT x or AMD V is turned on in your system’s BIOS or UEFI settings.
- Check Support on the Proxmox Host
Open the PVE shell and run the appropriate command:
- For Intel processors:
cat /sys/module/kvm_intel/parameters/nested
- For AMD processors:
cat /sys/module/kvm_amd/parameters/nested
- Understand the Output
- If the result is Y or 1, nested virtualization is supported and enabled.
- If the result is N, support is available but disabled. You’ll need to edit the kernel module options file and enable nested virtualization manually.
This quick check ensures your Proxmox environment is ready to host nested virtual machines.
Steps to Enable Nested Virtualization in PVE
Step 1. Check and Enable Nested Virtualization on the Host
First, confirm that your CPU supports nested virtualization.
- On Intel processors, open the Proxmox shell and run:
cat /sys/module/kvm_intel/parameters/nested
If the output shows N, it means the feature is turned off. Enable it with:
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
modprobe -r kvm_intel
modprobe kvm_intel
On AMD processors, run:
cat /sys/module/kvm_amd/parameters/nested
If the result is 0 or N, the feature is disabled. Turn it on with:
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
modprobe -r kvm_amd
modprobe kvm_amd
This step ensures the host passes CPU virtualization features down to guest machines.
Step 2. Configure the Virtual Machine
After enabling support on the host, adjust the VM settings in Proxmox.
- Stop the VM before making changes.
- In the Proxmox dashboard, open the Hardware settings of the VM.
- Set the CPU type to Host so the guest can use all CPU virtualization features.
Step 3. Restart the Virtual Machine
Once the configuration is complete, start the VM again. At this point, you can install and run virtualization software inside it, such as VMware ESXi, Hyper V, or Docker.
This setup gives you a fully functional nested environment where you can simulate complex infrastructures without adding more physical servers.
Backup Your Proxmox VMs Safely
Protecting your virtual machines is one of the most important tasks in any virtualized setup. Hardware failures, software errors, or accidental changes can lead to data loss. To prevent this, Proxmox VE provides a built-in backup system that is reliable and easy to use once it is properly configured.
Prepare the Backup Storage
The first step is to choose where you want to save your backups. Proxmox supports multiple storage options that you can connect and manage through the web interface.
- Proxmox Backup Server is the best choice for production because it supports features such as deduplication, incremental backups, and encryption.
- External drives or NAS devices can also be used. These include USB drives, additional disks inside the host, or a network share using NFS or SMB.
- To add your storage in Proxmox, go to the Datacenter section, open the Storage menu, and configure your preferred location.
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
Nested virtualization lets you safely test and simulate complex environments without extra hardware. Follow the steps in this guide to enable nested virtualization in PVR and maximize your virtual environment’s potential.
In brief, our Support Experts demonstrated how to fix the “554 5.7.1 : Relay access denied” error.
0 Comments