Not able to add memory more than 16x to VM online (Hot add memory)
search cancel

Not able to add memory more than 16x to VM online (Hot add memory)

book

Article ID: 388491

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Attempts to hot-add memory to a running virtual machine fail or the memory field appears greyed out in the vSphere Client.
  • Memory upscale operations fail when attempting to increase memory beyond 16 times the amount assigned at the last cold boot.
  • vCenter displays the error: Invalid virtual machine configuration.
  • ESXi logs (via vim-cmd vmsvc/get.config) show a hotPlugMemoryLimit that matches 16x the initial boot memory.



 

Environment

  • VMware vSphere ESXi 7.x / 8.x
  • VMware vCenter Server 7.x / 8.x

Cause

vSphere enforces a default safety limit for dynamic memory growth to ensure guest operating system stability and prevent memory address exhaustion. This is governed by the memory.maxgrow configuration parameter, which is set to 16 by default.

The maximum allowable hot-add memory is calculated as: Initial power-on memory * memory.maxgrow = hotPlugMemoryLimit

You can check max memory value for hot add using this command from the ESXi host which VM running on.

From this example, this VM was powered on with 4GB memory and it could increase 64GB using hot plug fuction.

# vim-cmd vmsvc/getallvms
Vmid         Name                                File                              Guest OS              Version   Annotation
22             test                                    test.vmx                     ubuntu64Guest      vmx-17

DB_TEST2
vim-cmd vmsvc/get.config 22 |grep -i hotplug
   hotPlugMemoryLimit = 65536,
   hotPlugMemoryIncrementSize = 128,

 

Resolution

To increase memory beyond the current limit, use one of the following methods. Both procedures require a virtual machine power cycle to apply the new limits.

Method 1: Reset the baseline (Recommended)

  1. Power off the virtual machine.
  2. Adjust the memory to the desired higher value (e.g., the current target size).
  3. Power on the virtual machine. This establishes a new baseline, allowing for further hot-add operations up to 16x the new size.

Method 2: Modify the memory.maxgrow parameter

  1. Power off the virtual machine.
  2. Right-click the virtual machine and select Edit Settings.
  3. Navigate to VM Options > Advanced > Configuration Parameters and select Edit Configuration.
  4. Click Add Configuration Params.
  5. Add the key memory.maxgrow and set a value between 1 and 1000 (e.g., set to 32 to double the default limit).
  6. Click OK to save and power on the virtual machine.

Additional Information: