12

Given the constrained RAM situation described in this question, what is the cleanest method (manual or programmatically) to:

  • Identify VMware virtual machines whose RAM has been reclaimed by the VMware balloon driver.
  • "Unballoon" the RAM.

Assume that more physical RAM is available to the environment.

I've found that I can vMotion a VM to another host, and that clears the ballooned state. Is there any other method that works?

Note: I've added several hosts and ~512GB of RAM to the environment. The ballooned VMs did not trigger a DRS rebalance action or unballoon themselves. I've had to manually vMotion each of the affected virtual machines to clear this, as shown below...


Here's the before... enter image description here

And the after... Following a vMotion to another host in the cluster. enter image description here

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • If you identify the ballooned VMs programmatically, then you'd need to supply a destination to your script to move them to. If this is a huge number of VMs/hosts, that may get complicated. Would it be easier to just maintenance-mode each host, serially, until the whole cluster has been migrated? – sjw Aug 05 '13 at 16:58
  • That would make sense... if there weren't RAM constraints in the cluster :) But yes, this works as well. – ewwhite Aug 05 '13 at 16:59
  • I know this is an old article, but i found it whilst researching a similar issue, and here's some useful info I located - especially the bits relating to the unwinding of balloon driver allocations. According to research done by someone at Kingston.com...(see comments on http://frankdenneman.nl/2010/11/29/disable-ballooning/) –  Apr 27 '16 at 11:25

1 Answers1

9

VMware actually has a KB article that has this information:

To force the balloon driver to release its hold on memory and prevent the guest operating system from using swap space, use one of these options:

  • Set the value of sched.mem.max to the allocated memory or greater.
  • Select the virtual machine's Resources > Memory > Limit > Unlimited box.
  • Migrate the virtual machine to another host.
Rex
  • 7,815
  • 3
  • 28
  • 44
  • Unfortunate. I've added several hosts and a lot of RAM to the environment. The ballooned VMs did not trigger a DRS rebalance or unballoon themselves. I've had to manually vMotion each of the affected virtual machines to clear this state. – ewwhite Aug 02 '13 at 16:10