Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
That did the trick, I'm able to hotplug memory into the VM now without reboot. – shad Oct 18 '13 at 14:31
Is there a way to enable the hot-plugging in the VM from the beginning? The VMWare-KB-article only describes how to fix this afterwards. I would have expected a syctl-setting that will enable memory-hot-plugging... – Nils Oct 22 '13 at 7:58
Hot-plugging is there, just not automatic. I guess the firmware doesn't send the ACPI event. You can use a script though; see… – Eddy Oct 22 '13 at 8:07

If that is anywhere like in Hyper-V then the max ram the VM has is fixed at boot - the balloon driver can hide ram, but not magically add it to the simulated hardware. So this likely is not possible without vm reboot.

share|improve this answer
Yeah, thanks TomTom!. I figured out that it will need DMC pre-configured. – shad Oct 16 '13 at 19:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.