Enabling Virtual Machine Interface (VMI) in a Linux kernel and in ESX 3.5

Posted on 10:04 PM by Bharathvn


VMware ESX 3.5 includes support for operating system kernels that use Virtual Machine Interface (VMI). VMI is the VMware open paravirtualization interface and is included in Linux kernel version 2.6.22 and later. To use VMI, it must be enabled in your Linux kernel and for the ESX 3.5 virtual machine in which that kernel is running.
Note: This is applicable only with Linux 32bit kernels.


Enabling VMI in a Linux Kernel
To enable VMI in your custom Linux kernel, enable the CONFIG_PARAVIRT and CONFIG_VMI options in the kernel config file, as illustrated in Figure 1.
Figure 1: Screen Shot Showing Kernel Configuration Options

A kernel compiled with VMI support can be run on native hardware or on a virtual machine. On native hardware or on a virtual machine where VMI is not enabled, the kernel functions like a regular kernel. On a virtual machine with VMI enabled, the kernel offers improved performance through its paravirtualization interface.
Enabling VMI in VMware ESX 3.5
In ESX 3.5, each virtual machine can have VMI either enabled or disabled. 
To enable VMI for a particular virtual machine, click the Summary tab for that virtual machine, click Edit Settings, select the Options tab, click Paravirtualization, and make sure Support VMI Paravirtualization is checked, as illustrated in Figure 2.

Figure 2: VMI Paravirtualization Option in VMware ESX 3.5

When VMI is enabled in the virtual machine settings, the lspci output in the guest operating system includes a new PCI device (identified as a Memory controller), as illustrated in Figure 3.

Figure 3: VMI PCI Device (identified as a Memory controller) in lspci Output

Note: The VMI PCI device, like other virtual PCI devices, takes up a virtual PCI slot.

The presence of the VMI device in the lspci output, however, does not confirm that the guest operating system is running in VMI mode. The dmesg output shown in Figure 4 confirms VMI mode, indicating that VMI is enabled in the virtual machine settings as well as in the Linux kernel.

Figure 4: Output From dmesg Confirming VMI Mode

Note: VMI-enabled kernels are included in some Linux distributions. Check with your Linux vendor to see if they have a VMI-enabled kernel available.