Nesting RHEL7 KVM on VMware Workstation 12

Recently I wished to build a Red Hat Enterprise Linux 7 (RHEL7) appliance with 2 KVM-virtualized guests. Essentially a type 2 hypervisor (VMM) on top of another type 2 hypervisor.

I installed RHEL7 on VMware Workstation 12 and configured it as a Virtualization Server. It was a smooth install without any issues. However I was surprised to find that KVM (Kernel-based Virtual Machine) simply did not work at all and lsmod did not even list the KVM kernel modules.

It turns out that you need to do two changes to your RHEL7 guest configuration file in order for KVM support to be enabled in RHEL7.

The first change requires you to manually edit the RHEL7 guest configuration file, i.e. the file ending in .vmx and add the following directive anywhere in the file:

apic.xapic.enabled = "FALSE"

The second required change can be done from the RHEL7 guest VM Settings pane in VMware Workstation. Go to VM > Settings > Options > Hardware > Processors and tickbox the Virtualize Intel VT-x/EPT or AMD-V/RVI option as shown below:

When you start up the guest after making these two changes, check that the kernel sees virtualization support and that the appropriate kernel drivers have been loaded.

Another useful command for checking virtualization support is the virt-what command:

As you probably know, Linux kernel modules support command line parameters which can be used to configure various settings in a driver. For example, to see the current settings for the kvm-intel module, use the modinfo utility as shown below:

KVM does not populate /sys/hypervisor. As far as I know, Xen was/is the only hypervisor to do so.


1 comment to Nesting RHEL7 KVM on VMware Workstation 12