The question has been asked many times already: is it possible to run a hypervisor INSIDE a Proxmox machine as a VM? The answer is yes. It is called nested virtualization and in this article, we will see how it is done.
Before You Begin
As a first step we check if nested virtualization is not enabled already. If it is, jump straight to Configure VM.
a. Check if nested virtualization is enabled
# If you have an Intel CPU
root@pve:/# cat /sys/module/kvm_intel/parameters/nested
N
# If the physical machine is equipped with an AMD CPU
root@pve:/# cat /sys/module/kvm_intel/parameters/nested
N
If the result is "No", we enable them by adding the following line to the kvm configuration as seen below. You only need to use the one corresponds to your CPU.
b. Enable the nested virtualization feature
# enable on Intel CPU
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
#enable on AMD CPU
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
c. Reboot the Proxmox computer
d. Verify the feature is enabled
root@pve:/# cat /sys/module/kvm_intel/parameters/nested
Y
#Or
root@pve:/# cat /sys/module/kvm_intel/parameters/nested
Y
Configure VM
To enable virtualization on the VM, you only need to make sure that the CPU type is set to "host"
Now the VM will be able to run virtualized machines in itself
Comments