I'm trying to upgrade RAM on a Xen VM without reboot. Although it looks working from the host node, the VM isn't picking up the upgraded memory.
Upgrading from 756 MB to 1024 MB. Below are the commands I used along with relevant info
xm list vm2 Name ID Mem VCPUs State Time(s) vm2 35 768 2 -b---- 180.5
RAM upgrade on the fly using xm mem-set
xm mem-max vm2 1024 xm mem-set vm2 1024
Host node now see it has upgraded RAM,
xm list vm2 Name ID Mem VCPUs State Time(s) vm2 35 1024 2 -b---- 210.6
However checking memory on the VM still shows only 756MB,
# free -m total used free shared buffers cached Mem: 750 669 80 0 23 145 -/+ buffers/cache: 500 249 Swap: 767 106 661
It picks any downgrade of the memory instantaneously, say to 512 MB.
Any advise would be appreciated.
Best Answer
Your kernel needs to support Linux Memory Hotplug
which will provide a sysfs interface to the server's RAM configuration under /sys/devices/system/memory from where you can en/dis-able modules by writing to /sys/devices/system/memory/memory[number]/state
This VMWare KB article has a step-by-step procedure.
You may also want to dig around CentOS forums for "memory hot plug not working on CentOS vm" as it's supposed to work and the solution is quite probably a general configuration issue.