Enable the VMware balloon driver vmmemctl to prevent swapping in an imported Linux VM

After running Alan Renouf’s excellent vCheck5 script against a vCenter Server, I noticed alot of VM’s where ESXi was actively swapping memory without any memory being ballooned

This, ofcourse, required further investigation.

I checked one of the ESXi hosts that was serving the VM’s using resxtop on our vMA and found that the balloon driver was not active:

I found the possible reasons for a non-working balloon driver on page 34 of the Resource Management guide (ESXI 4.1 U2 is in use):

ESX/ESXi hosts use swapping to forcibly reclaim memory from a virtual machine when the vmmemctl driver is not available or is not responsive.

– It was never installed.
– It is explicitly disabled.
– It is not running (for example, while the guest operating system is booting).
– It is temporarily unable to reclaim memory quickly enough to satisfy current system demands.
– It is functioning properly, but maximum balloon size is reached.

The balloon driver cannot be disabled on host level and the VM’s didn’t have their sched.mem.maxmemctl parameter set to 0. The VMware Tools were installed. This eliminated options 1 & 2. It was now time to look into the VM.

After cloning a test VM and disconnecting it’s virtual cable, it was time to boot. After logging in I ran the

vmware-toolbox-cmd –version

command to show the version. It was running the latest version 8.3.12 build 559003, so that seemed OK. Next was running the config script

vmware-config-tools.pl

and I was promptly faced with the root cause of the problem because I received the following warning message

The module vmmemctl has already been installed on this system by another installer or package and will not be modified by this installer. Use the flag –clobber-kernel-modules=vmmemctl to override.

It seemed that almost every VM with this problem was an imported Oracle VM virtual machine. During it’s migration to the vSphere platform, the VMware Tools were installed, although now it seemed the installation was not correct/complete.

There were no obstacles to enable the correct VMware Tools vmmemctl driver, so running the suggested command

vmware-config-tools –clobber-kernel-modules=vmmemctl

fixed the problem. After a reboot I checked if the balloon driver was working

All OK. Onto the next challenge. Did I mention I love my job? =]

EDIT: On some VM’s it seems the pvscsi, vmxnet3, vsock and vmci kernel modules were having the same problem. I choose to fix them too. The complete command would be

vmware-config-tools –clobber-kernel-modules=vmmemctl,vsock,vmxnet3,vmci,pvscsi

Advertisements

About Yuri de Jager
Technology Addict

3 Responses to Enable the VMware balloon driver vmmemctl to prevent swapping in an imported Linux VM

  1. Hi Yuri… I take it that this issue was related to Linux guests and not Windows guests?

    Have you had the same issue on Windows guests and if so what commands did you run?

    Regards

    Steve

    • Yuri de Jager says:

      Hi Steve. Yes, this was for a Linux guest. I’ve never had this issue on a Windows VM. To my knowledge you cannot activate a kernel module in a live Windows installation like in Linux.

      There are many ways to make sure the driver is loaded, so I won’t go into that. But before I would start my troubleshooting I would de-install and reinstall the most recent version of the VMware Tools.

  2. Pingback: vmmemctl unter Ubuntu | exdc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: