Search the VMware Knowledge Base (KB)
View by Article ID

Hot adding memory in Linux (1012764)

  • 53 Ratings

Symptoms

Memory you have hot added in Linux is not registered in the guest using the free or top commands.

Cause

This issue occurs when Linux requires manual intervention to expose the newly added memory in the guest. The process is called setting the memory to online.

Resolution

To resolve this issue, set the memory online in RHEL, CentOS, and SLES OS.
  • To set the memory online in RHEL and CentOS:
  1. Look for memory that appears offline.

    Run this command to check the state of the memory:

    grep line /sys/devices/system/memory/*/state

  2. When memory appears offline, run this command to set it to online:

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

  • To set the memory online in SLES OS:
    1. Run this command to load the acpiphp module for SLES to detect hot add devices:

      modprobe acpiphp

    2. Run this command to enable acpi_memhotplug within the SLES virtual machine:

      modprobe acpi_memhotplug

    3. Using vSphere Client edit the virtual machine settings to increase the memory assigned. For more information, see Increasing the amount of memory assigned to a virtual machine (1004059).
    4. Run this command to bring the memory online in /sys/devices/system/:

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

    5. Run this command to check the state of the memory.

      Look for memory that appears offline:

      grep line /sys/devices/system/memory/*/state

    6. When memory appears offline, run this command to set it to online:

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

    7. Verify you can see the extra memory by running this command:

      free -m

Additional Information

For more information, see How to use memory hotplug from Linux Memory Hotplug Support.

Note: The preceding link was correct as of August 26, 2015. If you find the link is broken, provide a feedback and a VMware employee will update the link.

Tags

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

See Also

Update History

09/06/2013 - Added Workstation 10,Fusion 6, and Player 6 to the Product Version. 02/12/2014 - Updated for Workstation 11.x 02/12/2014 - Updated for Player 7.x

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

  • 53 Ratings

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)




Please enter the Captcha code before clicking Submit.
  • 53 Ratings
Actions
KB: