For Ubuntu KVM host:
Create a configuration file to enable nested virtualization �:
# For Intel CPUs
echo "options kvm-intel nested=1" | sudo tee /etc/modprobe.d/kvm.conf
# For AMD CPUs
echo "options kvm-amd nested=1" | sudo tee /etc/modprobe.d/kvm.conf
# Reload the module
sudo modprobe -r kvm_intel # or kvm_amd
sudo modprobe kvm_intel # or kvm_amd