Increase memory for XEN VM

I have the need to add more memory to a XEN VM and I’m bit uncertain of the
procedure for this. I would be very please if some kind soul could take the time
to enlighten me.

Problem is that one of my XEN VMs is maxed out on memory (8 GB) and I need to
increase it’s memory to 9 GB. I know this should in theory be able to do on the fly
with the help of ‘xm mem-set memory’ but I’m reluctant to change
a heavily used VM on the fly, because of the risks attached to doing so.
However, in this case the maxmem parameter for the VM is set to what is
currently allocated by the VM, so I can’t increase memory on the fly as I
understand. I need to take the VM down.
Also checking with ‘free -g’ on the XEN Host I got about 4GB free so I understand
it should be possible to add 1 GB to the VM.

Is it as simple as to just run the following commands?;

xm list -l > /root/.vm-premem
xm shutdown
xm mem-max 10000
xm mem-set 9000
xm start
xm list -l > /root/.vm-postmem

Should anything go wrong I can use the backed up profile to recreate the VM?

Thanks!

[QUOTE=jdoeconsulting;19728]I have the need to add more memory to a XEN VM and I’m bit uncertain of the
procedure for this. I would be very please if some kind soul could take the time
to enlighten me.

Problem is that one of my XEN VMs is maxed out on memory (8 GB) and I need to
increase it’s memory to 9 GB. I know this should in theory be able to do on the fly
with the help of ‘xm mem-set memory’ but I’m reluctant to change
a heavily used VM on the fly, because of the risks attached to doing so.
However, in this case the maxmem parameter for the VM is set to what is
currently allocated by the VM, so I can’t increase memory on the fly as I
understand. I need to take the VM down.
Also checking with ‘free -g’ on the XEN Host I got about 4GB free so I understand
it should be possible to add 1 GB to the VM.

Is it as simple as to just run the following commands?;

xm list -l > /root/.vm-premem
xm shutdown
xm mem-max 10000
xm mem-set 9000
xm start
xm list -l > /root/.vm-postmem

Should anything go wrong I can use the backed up profile to recreate the VM?

Thanks![/QUOTE]

Those steps are fine. You might however find it easier to use virt-manager to change the setting from the GUI.

Cheers,
Willem

Magic31 wrote:

Thanks Willem!