Hi, <div><br></div><div>Yes you are right, as part of the next release of OpenNebula, we are improving the image management system including some operations to save (snapshot) running VMs. With this new feature I think we cover both use-cases</div>

<div><br></div><div>Cheers</div><div><br></div><div>Ruben<br><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 12:18 AM,  <span dir="ltr"><Carsten.Friedrich@csiro.au></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div lang="EN-AU" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Hi Ruben,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal">

<span style="font-size:11.0pt;color:#1F497D">Thanks for the clarification. I see where you are coming from and understand your reasoning. One issue with this approach is that it means that saveas will never work for some VMs. In particular it will only work for VMs that can receive ACPI events and are running an OS that is (correctly) configured to shut itself down on the relevant ACPI event. I think it would be good to have a mechanism which allows users to save VMs as images that does not require the active cooperation of the VM and its OS.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Carsten</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Also, as a minor side-note: OpenNebula is currently writing error messages to the log when doing cancel/delete on a VM after a saveas; which it probably shouldn’t.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">

<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> <a href="mailto:rsmontero@gmail.com" target="_blank">rsmontero@gmail.com</a> [mailto:<a href="mailto:rsmontero@gmail.com" target="_blank">rsmontero@gmail.com</a>] <b>On Behalf Of </b>Ruben S. Montero<br>

<b>Sent:</b> Wednesday, 16 March 2011 3:25<br><b>To:</b> Friedrich, Carsten (ICT Centre, Acton)<br><b>Cc:</b> <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br><b>Subject:</b> Re: [one-users] saveas not always working</span></p>

</div><div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal">Hi Carsten,</p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">You are right, to save an image you have to shutdown the VM (i.e. shutdown + move the image back to the front-end). The image is "savedas" from there s if you cancel/delete a VM it is assumed that you do not want to keep the VM so it won't be saved. </p>

</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">The idea is to provide a fast image disposal mechanism for rapid VM provisioning. Basically VMs that do not need to preserve their state. </p></div><div>

<p class="MsoNormal"> </p></div><div><p class="MsoNormal">So basically, I think OpenNebula is behaving as expected....</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Cheers</p></div><div><p class="MsoNormal">

 </p></div><div><p class="MsoNormal">Ruben</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"> </p><div><p class="MsoNormal"> </p><div><p class="MsoNormal">On Tue, Mar 15, 2011 at 12:02 AM, <Carsten.Friedrich@csiro.au> wrote:</p>

<div><div><p class="MsoNormal"><span style="color:#1F497D">Sorry to  bother everyone again. Currently I think this is a bug in OpenNebula; but before I file a bug report I want to make sure it’s not a local problem with my installation here or a fundamental misunderstanding on my side of what should happen. </span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p><p class="MsoNormal"><span style="color:#1F497D">Thanks,</span></p><p class="MsoNormal"><span style="color:#1F497D">Carsten</span></p><p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> <a href="mailto:users-bounces@lists.opennebula.org" target="_blank">users-bounces@lists.opennebula.org</a> [mailto:<a href="mailto:users-bounces@lists.opennebula.org" target="_blank">users-bounces@lists.opennebula.org</a>] <b>On Behalf Of </b>Carsten.Friedrich@csiro.au<br>

<b>Sent:</b> Friday, 4 March 2011 15:22</span></p><div><p class="MsoNormal"><br><b>To:</b> <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a></p></div><p class="MsoNormal"><b>Subject:</b> [ExternalEmail] Re: [one-users] saveas not always working</p>

</div></div><div><div><p class="MsoNormal"> </p><p class="MsoNormal"><span style="color:#1F497D">Some more insights after a bit more digging:</span></p><p class="MsoNormal"><span style="color:#1F497D"> </span></p><p class="MsoNormal">

<span style="color:#1F497D">It seems to me that a successful save depends on the disk image(s) being moved from the .../var/XX/images directory to .../var/XX. This seems to happen during the shutdown epilog, but not during cancel or finalize.</span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p><p class="MsoNormal"><span style="color:#1F497D">Carsten</span></p><p class="MsoNormal"><span style="color:#1F497D"> </span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">

<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> <a href="mailto:users-bounces@lists.opennebula.org" target="_blank">users-bounces@lists.opennebula.org</a> [mailto:<a href="mailto:users-bounces@lists.opennebula.org" target="_blank">users-bounces@lists.opennebula.org</a>] <b>On Behalf Of </b>Carsten.Friedrich@csiro.au<br>

<b>Sent:</b> Friday, 4 March 2011 14:53<br><b>To:</b> <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br><b>Subject:</b> [ExternalEmail] [one-users] saveas not always working</span></p>

</div></div><p class="MsoNormal"> </p><p class="MsoNormal"><span lang="EN-US">I use OpenNebula 2.0.1 with KVM as hypervisor. I issue an saveas command and as far as I understand things the image should be saved when the vm reaches the state DONE. From a state ACTIVE – RUNNING there seem to be 3 actions to get to DONE: </span></p>

<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Shutdown: In this case the image gets saved and all is good.</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal">

<span lang="EN-US">Cancel, and finalize: In these cases the image hook is called, but it produces this error message:</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Fri Mar  4 14:36:19 2011 [HKM][D]: Message received: LOG - 85 Command execution fail: /srv/cloud/one/share/hooks/image.rb 85</span></p>

<p class="MsoNormal"><span lang="EN-US">Fri Mar  4 14:36:19 2011 [HKM][D]: Message received: LOG - 85 STDERR follows.</span></p><p class="MsoNormal"><span lang="EN-US">Fri Mar  4 14:36:19 2011 [HKM][D]: Message received: LOG - 85 ExitCode: 255</span></p>

<p class="MsoNormal"><span lang="EN-US">Fri Mar  4 14:36:19 2011 [HKM][D]: Message received: EXECUTE FAILURE 85 image</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">The image is not saved, but its state is nevertheless set to READY.</span></p>

<p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">I would like the image to successfully save in all 3 cases. Your help is much appreciated.</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p>

<p class="MsoNormal"><span lang="EN-US">Thanks,</span></p><p class="MsoNormal"><span lang="EN-US">Carsten</span></p></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>

Users mailing list<br><a href="mailto:Users@lists.opennebula.org" target="_blank">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></p>

</div><p class="MsoNormal"><br><br clear="all"><br>-- <br>Dr. Ruben Santiago Montero<br>Associate Professor (Profesor Titular), Complutense University of Madrid<br><br>URL: <a href="http://dsa-research.org/doku.php?id=people:ruben" target="_blank">http://dsa-research.org/doku.php?id=people:ruben</a><br>

Weblog: <a href="http://blog.dsa-research.org/?author=7" target="_blank">http://blog.dsa-research.org/?author=7</a></p></div></div></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Dr. Ruben Santiago Montero<br>

Associate Professor (Profesor Titular), Complutense University of Madrid<br><br>URL: <a href="http://dsa-research.org/doku.php?id=people:ruben" target="_blank">http://dsa-research.org/doku.php?id=people:ruben</a><br>Weblog: <a href="http://blog.dsa-research.org/?author=7" target="_blank">http://blog.dsa-research.org/?author=7</a><br>


</div>