Wednesday, June 19, 2019

Nested Virtualization KVM on CentOS 7

Nested Virtualization is disabled by default on CentOS 7, we can verify by running a command:

# cat /sys/module/kvm_intel/parameters/nested

Make sure KVM is intalled on the machine, if output is N, then Nested Virtualization is disabled, to enable the feature, set options kvm-intel nested=1 in /etc/modprobe.d/kvm-nested.conf

# echo "options kvm-intel nested=1" > /etc/modprobe.d/kvm-nested.conf

Reboot the machine, and verify like above command.
On the xml configuration, ensure cpu mode is host-passthrough

To use nested virtualization, the host CPU must have the necessary feature flags: For Intel - vmx (Hardware Virtualization) and ept (Extended Page Tables) For AMD - svm (equivalent to vmx) and npt (equivalent to ept) Check that flag on /proc/cpuinfo

No comments:

Post a Comment