Hot Adding Memory to RHEL5 in a VM under VMware ESXi 4.0 – mostly broken

VMware supports hot add of memory. It works seemlessly in Windows 2008 (and Windows 2003 Enterprise edition). Linux requires some manual intravention, as mentioned in this VMware KB:

http://kb.vmware.com/kb/1012764

[root@rhel5soe ~] # cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@rhel5soe ~] # head -1 /proc/meminfo
MemTotal:      1927704 kB

Now I increase the memory from 2GB to 4GB in the VM

[root@rhel5soe ~] # grep line /sys/devices/system/memory/*/state
/sys/devices/system/memory/memory0/state:online
/sys/devices/system/memory/memory10/state:online
/sys/devices/system/memory/memory11/state:online
/sys/devices/system/memory/memory12/state:online
/sys/devices/system/memory/memory13/state:online
/sys/devices/system/memory/memory14/state:online
/sys/devices/system/memory/memory15/state:online
/sys/devices/system/memory/memory16/state:offline
/sys/devices/system/memory/memory18/state:offline
/sys/devices/system/memory/memory19/state:offline
/sys/devices/system/memory/memory1/state:online
/sys/devices/system/memory/memory20/state:offline
/sys/devices/system/memory/memory21/state:offline
/sys/devices/system/memory/memory22/state:offline
/sys/devices/system/memory/memory23/state:offline
/sys/devices/system/memory/memory2/state:online
/sys/devices/system/memory/memory3/state:online
/sys/devices/system/memory/memory4/state:online
/sys/devices/system/memory/memory5/state:online
/sys/devices/system/memory/memory6/state:online
/sys/devices/system/memory/memory7/state:online
/sys/devices/system/memory/memory8/state:online
/sys/devices/system/memory/memory9/state:online

[root@rhel5soe ~] # for f in /sys/devices/system/memory/*/state; do \ echo online > $f; done 2> /dev/null 
[root@rhel5soe ~] # grep line /sys/devices/system/memory/*/state
/sys/devices/system/memory/memory0/state:online
/sys/devices/system/memory/memory10/state:online
/sys/devices/system/memory/memory11/state:online
/sys/devices/system/memory/memory12/state:online
/sys/devices/system/memory/memory13/state:online
/sys/devices/system/memory/memory14/state:online
/sys/devices/system/memory/memory15/state:online
/sys/devices/system/memory/memory16/state:online
/sys/devices/system/memory/memory18/state:online
/sys/devices/system/memory/memory19/state:online
/sys/devices/system/memory/memory1/state:online
/sys/devices/system/memory/memory20/state:online
/sys/devices/system/memory/memory21/state:online
/sys/devices/system/memory/memory22/state:online
/sys/devices/system/memory/memory23/state:online
/sys/devices/system/memory/memory2/state:online
/sys/devices/system/memory/memory3/state:online
/sys/devices/system/memory/memory4/state:online
/sys/devices/system/memory/memory5/state:online
/sys/devices/system/memory/memory6/state:online
/sys/devices/system/memory/memory7/state:online
/sys/devices/system/memory/memory8/state:online

[root@rhel5soe ~] # head -1 /proc/meminfo
MemTotal:      2845208 kB

Done. However, we now see 2.713GB or memory rather than 4GB.

and Increasing the memory to – say – 16GB still leaves it at 2.713GB

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: