Article ID: 111199, created on Apr 28, 2011, last review on May 11, 2014

  • Applies to:
  • Virtuozzo hypervisor 5.0


When you hot add memory to a Linux virtual machine, it may not be displayed in the output of the free or top commands.


In the above situation, you need to make sure the needed modules are loaded and then put the memory in the "online" state manually in order for it to be detected by the guest OS. Follow the below steps to do this:

Note: The first two steps are usually needed for SLES guests only.

1. Check if the acpiphp and acpi_memhotplug modules are loaded properly with

# lsmod | grep acpi
                 acpiphp            43673  0
                 acpi_memhotplug        42199  0

If they are not loaded, load them with

# modprobe acpiphp
# modprobe acpi_memhotplug

2. Try increasing the virtual machine memory again via command line tools or GUI, e.g., PMC or PVA.

3. Create a shell script with the below content:

for a in `ls /sys/devices/system/memory/memory*/state`;
echo "online" > $a;
done 2>/dev/null;
grep offline /sys/devices/system/memory/memory*/state

Save it and exit.

4. Allow execution of this script with

# chmod u+x

5. Execute the script:

# ./

It should return no output.

Note: On Ubuntu, you may need to run it like this:
# /bin/bash

6. Check the new memory configuration, either in the /proc/meminfo file or by running the below command

# free

c662da62f00df94fd77ba7a2c9eff4b4 a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF