[one-users] How-to set RAM on Running KVM VM in CentOS 6.2x86 + openNebula v3.6
cloud.b.lab
cloud.b.lab at zoho.com
Tue Aug 21 22:38:39 PDT 2012
As per my limited understanding:
The RAM size you specify in the VM template using "MEMORY=xxxx" translates to "Maximum available memory" for an active domain.
Hence, while the domain being active , I think one cannot go beyond the available/max mem.
If you edit the XML file through libvirt and force change the Maximum memory value to anything higher, you may end up in Kernel Panic situation.
If you would like to try it , do the following:
1. Create a test vm
2. Verify the total memory using "free" command
3. Go to the machine running libvirt
4. Get the doamin ID using virsh list
5. Save the current state of doamin using virsh save <Doamin_ID> <Filename-with-domain-name>
(so that you have a copy of it)
6. Restore the doamin using virsh <Filename-with-domain-name>
5. Edit the doamin XML using virsh edit <DOMAIN_ID>
6. Try to change values for <memory> and <currentMemory> tags to a higher value divisible by 1024.
Assume current <memory> is 1048576.
e.g.
<memory>2095104</memory>
<currentMemory>2095104</currentMemory>
7. Try to reboot the doamin virsh reboot <DOAMIn-ID>
8. Check available memory using "free"
9. Try issue setmaxmem command to increase memory to 2095104 virsh setmaxmem <DOAMIn-ID> 2095104
oneadmin at onehost:~$ virsh setmaxmem 4 2095104
error: Unable to change MaxMemorySize
error: Requested operation is not valid: cannot resize the maximum memory on an active domain
10. Try to increase available memory
oneadmin at onehost:~$ virsh setmem 4 2095104
error: Requested memory size 2095104 kb is larger than maximum of 1048576 kb
Hope this helps.....
Regards,
Anil.
---- On Tue, 21 Aug 2012 10:42:41 -0700 Lawrence Chiong<junix88 at gmail.com> wrote ----
Hello,
Can anyone guide me a step-by-step guide on HOWTO change/update RAM on a fly / running VM (KVM). Because I tried changing my VM template (in sunstone) its Memory (e.g. from 2048M to 4096M) and then reboot my KVM VM but changes made doesn't take effect. So I tried manually changed the .../deployment.0 file and update the Memory element and update also the vm_pool table on body field +Memory element to 4096M then I restarted "oned" + "sunstone" so with mysqld BUT still the memory being updated doesn't changed.
Any help is very much appreciated.
Thank you.
Junix
_______________________________________________
Users mailing list
Users at lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120821/2d8b7fce/attachment-0002.htm>
More information about the Users
mailing list