<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Junix,<div><br></div><div><b>There is an indirect method</b>, <b>but I do not recommend that as it will send wrong and incorrect signals to OpenNebula Monitoring program and if you do not have fast hands, your VM will end up in "unkn" state.</b></div><div><br></div><div>Again I am saying I it is not a  recommend practice and you don't try  it in a non test environment.  </div><div><br></div><div><br></div><div><div style="font-family: verdana, arial, helvetica, sans-serif; ">If you would like to try it for information purpose , do the following:</div><div style="font-family: verdana, arial, helvetica, sans-serif; "><br></div><div style="font-family: verdana, arial, helvetica, sans-serif; ">1. Create a test vm and login.</div><div style="font-family: verdana, arial, helvetica, sans-serif; ">   e.g.   153 oneadmin oneadmin centos63  runn   10   <b>1024M</b> onehost      0d 00h12</div><div style="font-family: verdana, arial, helvetica, sans-serif; "><br></div><div style="font-family: verdana, arial, helvetica, sans-serif; ">2. Verify the total memory using "free" command</div><div style="font-family: verdana, arial, helvetica, sans-serif; "><br></div><div style="font-family: verdana, arial, helvetica, sans-serif; ">3. Go to the machine running libvirt [means your OpenNebula Node]</div><div style="font-family: verdana, arial, helvetica, sans-serif; "><br></div><div style="font-family: verdana, arial, helvetica, sans-serif; ">4. Get the doamin ID using                     virsh list</div><div style="font-family: verdana, arial, helvetica, sans-serif; "><br></div><div style="font-family: verdana, arial, helvetica, sans-serif; ">5. Get a xmldump of running domain         virsh dumpxml <Domain-ID>  <file-name>          </div><div><font face="verdana, arial, helvetica, sans-serif">    e.g.  virsh dumpxml 7 > /var/lib/one/template/one-149</font></div><div><font face="verdana, arial, helvetica, sans-serif"><br></font></div><div><font face="verdana, arial, helvetica, sans-serif">6. Open the XML and change the memory values, Save. Assume currently it is 1048576.</font></div><div>  <memory>2095104</memory></div><div>  <currentMemory>2095104</currentMemory></div><div><font face="verdana, arial, helvetica, sans-serif"><br></font></div><div><font face="verdana, arial, helvetica, sans-serif">7. Destroy the running domain </font>                <span style="font-family: verdana, arial, helvetica, sans-serif; ">virsh destroy 6</span></div><div><font face="verdana, arial, helvetica, sans-serif"><br></font></div><div><font face="verdana, arial, helvetica, sans-serif">8. List all doamins in Shut-off state </font>         <span style="font-family: verdana, arial, helvetica, sans-serif; ">virsh list --all</span></div><div><font face="verdana, arial, helvetica, sans-serif"><br></font></div><div><font face="verdana, arial, helvetica, sans-serif">9. If it is there in shut-off state, undefine it</font>          <span style="font-family: verdana, arial, helvetica, sans-serif; ">virsh undefine <DOAMIn-NAME></span>           </div><div>      e.g. <span style="font-family: verdana, arial, helvetica, sans-serif; ">virsh undefine one-149</span></div><div><font face="verdana, arial, helvetica, sans-serif"><br></font></div><div><font face="verdana, arial, helvetica, sans-serif">10. Recreate the doamin using the XML </font>      </div><div>      e.g. <span style="font-family: verdana, arial, helvetica, sans-serif; ">virsh create /var/lib/one/template/one-149</span></div><div><span style="font-family: verdana, arial, helvetica, sans-serif; "><br></span></div><div><span style="font-family: verdana, arial, helvetica, sans-serif; ">11. Connect through VNC , login as root and check with "free". You will see a higher MEM value </span></div><div><span style="font-family: verdana, arial, helvetica, sans-serif; "><br></span></div><div><span style="font-family: verdana, arial, helvetica, sans-serif; ">11. Give onevm top ,</span><span style="font-family: verdana, arial, helvetica, sans-serif; ">Wait for some time: OpenNebula reports the following.</span></div><div><span style="font-family: verdana, arial, helvetica, sans-serif; "><br></span></div><div><span style="font-family: verdana, arial, helvetica, sans-serif; "><div>153 oneadmin oneadmin  centos63   runn    5      <b>2G</b> onehost      0d 00h24</div><div><br></div></span></div><div><span style="font-family: verdana, arial, helvetica, sans-serif; "><br></span></div><div><font face="verdana, arial, helvetica, sans-serif"> Thanks and regards,</font></div><div><font face="verdana, arial, helvetica, sans-serif">Anil Kumar</font></div><div><font face="verdana, arial, helvetica, sans-serif"><br></font></div><div><font face="verdana, arial, helvetica, sans-serif"><br></font></div><div><br></div><div id="1">---- On Tue, 21 Aug 2012 22:38:39 -0700 <b>cloud.b.lab<<a href='mailto:cloud.b.lab@zoho.com' target='_blank'>cloud.b.lab@zoho.com</a>></b> wrote ---- <br></div><br><blockquote style="border-left: 1px solid #0000FF; padding-left: 6px;"><div><div style="font-size:10pt;font-family:verdana,arial,helvetica,sans-serif;"><div>As per my limited understanding:</div><div><br></div><div>The  RAM size you specify in the VM template using "MEMORY=xxxx" translates to "Maximum available memory" for an active domain.<br></div><div>Hence, while the domain being active , I think one cannot go beyond the available/max mem. </div><div><br></div><div>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.</div><div><br></div><div>If you would like to try it , do the following:</div><div>1. Create a test vm</div><div>2. Verify the total memory using "free" command</div><div>3. Go to the machine running libvirt</div><div>4. Get the doamin ID using                               virsh list</div><div>5. Save the current state of doamin using          virsh save <Doamin_ID>  <Filename-with-domain-name></div><div>    (so that you have a copy of it)                      </div><div>6. Restore the doamin      using                        virsh  <Filename-with-domain-name></div><div>5. Edit the doamin XML using                            virsh edit <DOMAIN_ID></div><div>6. Try to change values for <memory> and <currentMemory> tags to a higher value divisible by 1024.</div><div>     Assume current <memory> is 1048576.</div><div>e.g. </div><div> <memory>2095104</memory></div><div><div>  <currentMemory>2095104</currentMemory></div></div><div>7. Try to reboot the doamin                              virsh reboot <DOAMIn-ID></div><div>8. Check available memory using "free"</div><div>9. Try issue setmaxmem command to increase memory to 2095104   virsh setmaxmem <DOAMIn-ID> 2095104</div><div><br></div><div><div>oneadmin@onehost:~$ virsh setmaxmem 4 2095104</div><div>error: Unable to change MaxMemorySize</div><div>error: Requested operation is not valid: cannot resize the maximum memory on an active domain</div></div><div>10. Try to increase available memory</div><div><div>oneadmin@onehost:~$ virsh setmem 4 2095104</div><div>error: Requested memory size 2095104 kb is larger than maximum of 1048576 kb</div></div><div><br></div><div>Hope this helps.....</div><div><br></div><div>Regards,</div><div>Anil.</div><div><br></div><div><br></div><div><div><br>---- On Tue, 21 Aug 2012 10:42:41 -0700 <b>Lawrence Chiong<<a href="mailto:junix88@gmail.com" target="_blank" mailid="junix88%40gmail.com" subj="">junix88@gmail.com</a>></b> wrote ---- <br></div><br><blockquote style="border-left: 1px solid #0000ff; padding-left: 6px;">Hello,<br><br>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.<br> <br>Any help is very much appreciated. <br><br>Thank you.<br><br>Junix<br> _______________________________________________ <br>Users mailing list <br><a href="mailto:Users@lists.opennebula.org" target="_blank" mailid="Users%40lists.opennebula.org" subj="">Users@lists.opennebula.org</a> <br><a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a> <br></blockquote><br></div></div>_______________________________________________ <br>Users mailing list <br><a href="mailto:Users@lists.opennebula.org" target="_blank" mailid="Users%40lists.opennebula.org" subj="">Users@lists.opennebula.org</a> <br><a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a> <br></div></blockquote><br></div></div></body></html>