By default, PVE does not expose hardware-assisted virtualization extensions to VMs. Performance of hypervisor within VM will be degraded.
Enable nested support
Login to PVE terminal or via SSH or web gui -> Shell
To check if nested virtualization is enabled, bring up terminal/SSH/Shell, execute following command
cat /sys/module/kvm_intel/parameters/nested
If it returns “N”, that means it’s disabled
To enable
# Intel
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
# AMD
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
Then
# Intel
modprobe -r kvm_intel
modprobe kvm_intel
# AMD
modprobe -r kvm_amd
modprobe kvm_amd
If error returns, just reboot the PVE host
Check again
# Intel
cat /sys/module/kvm_intel/parameters/nested
# AMD
cat /sys/module/kvm_amd/parameters/nested
We should get “Y” which means nested virtualization is enabled
To enable nested virtualization for guest VMs
Intel CPU:
- Set the CPU type for VMs to “host”
AMD CPU:
- Set the CPU type for VMs to “host”
- Add following flags to the configuration file
args: -cpu host,+svm
We can use following command to check/verify hardware virtualization support is enabled or not on Linux OSs
egrep '(vmx|svm)' --color=always /proc/cpuinfo
Official source Nested Virtualization – Proxmox VE:
https://pve.proxmox.com/wiki/Nested_Virtualization