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

  • Customer tried to increase memory online but failed.
  • They can't increase memory more than 16x from initial powered on memory

 

Environment

ESXi 7.0

ESXi 8.0

Cause

Hot add memory fuction can increase 16x from the initial powered on VM's memory.

It's because VM's config memory.maxgrow is set to 16 as default.

Max memory for hot add = Initial powered on memory of VM * memory.maxgrow


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

You can add 'memory.maxgrow' in VM's configuration

Default value is 16 and you can change it betwwen '1 <= x <= 1000'

There is 2 ways for adding this value.

This value could adjust in offline so you should power off VM first.

  • Using vSphere UI
    1. Power off the virtual machine.
    2. Right-click the virtual machine and click Edit Settings.
    3. Click Options > General > Configuration Parameters.
    4. Click Add Row.
    5. Under Name, type memory.maxgrow in the Value field and enter any value
    6. Power on VM

  • Adding value to VM's vmx (configuration) file.
    - Power off VM
    - ssh to ESXi host and found the VM's configuration file (XXX.vmx file) in vmfs directory
    - Add this value to the bottom of the file. (Replace value in 'XXX')
    memory.maxgrow=XXX

    - Power on VM