Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Hot adding memory in Linux

Symptoms

When you hot add memory in Linux, it may not register in the guest when you run the free or top command.

Resolution

Linux may require manual intervention to expose the newly added memory in the guest. The process is called setting the memory to online. 

RHEL and CentOS

To set the memory online in RHEL and CentOS:
 
Note: These instructions work for RHEL and CentOS. Other distributions may be different.
  1. Run this command to check the state of the memory, looking for memory that appears offline:

    grep line /sys/devices/system/memory/*/state
     
  2. If memory appears as offline, set it to online with the command:

    echo online > /sys/devices/system/memory/memory[number]/state
     

SLES OS 

To set the memory online in SLES OS:
 
Note: These instructions work for SLES OS. Other distributions may be different.
  1. To enable acpi_memhotplug, run this command within the SLES virtual machine:

    modprobe acpi_memhotplug
     
  2. Using vSphere Client, edit the virtual machine settings to increase the memory assigned to the virtual machine. For more information, see Increasing the amount of memory assigned to a virtual machine (1004059).

  3. Bring the memory online in /sys/devices/system/memory with the command:

    echo online > /sys/devices/system/memory/memory[number]/state
     
  4. Run this command to check the state of the memory, looking for memory that appears offline:

    grep line /sys/devices/system/memory/*/state
     
  5. If memory appears as offline, set it to online with the command:

    echo online > /sys/devices/system/memory/memory[number]/state
     
  6. Verify that you can see the extra memory with the command:
     
    free -m

Additional Information

For more information, see http://kerneltrap.org/node/14009.
Note: The preceding link was available as of December 18, 2009. If you find the link to be broken, provide feedback on the article and a VMware employee will update the article as necessary.

Tags

virtual-machine-hotadd-device linux-hot-add-memory

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback


Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
Actions
KB: