Hi,<div><br></div><div>You are right, that is the intended behavior for non-persistent images. As you describe, there may be some situation where this is not convenient. </div><div><br></div><div>The suggested procedure for this, VMs that are *not stateless* is to perform the cloning prior to submissions,  this is:</div>

<div>1.- oneimage clone</div><div>2.- onevm create</div><div>...</div><div>This can be automatically perform with a script, that use as base an existing template</div><div><br></div><div>In the medium term, we plan to implement snapshots (disk snapshots). When this feature become available the recover hook will revert to the last available snapshot of a VM...</div>

<div><br></div><div>When the VMs are in unknown state (that may be the case, if the host fail) you can use restart. This will just  issue a boot operation (at the hypervisor level). Note that this operation is performed in the *same* host, so before using it you have to fix and boot the physical host. This will prevent any image deletion from opennebula.</div>

<div><br></div><div>Cheers</div><div><br></div><div>Ruben</div><div><br><div class="gmail_quote">On Tue, Jul 31, 2012 at 3:08 PM, Stefan Catargiu <span dir="ltr"><<a href="mailto:stefancatargiu@gmail.com" target="_blank">stefancatargiu@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<div><br></div><div><br></div><div>Right now the suggested behavior for a host failure is pretty bad. In theory resubmitting is great, but what do you do when you are not using persistent images?</div>

<div>When the VM is resubmitted, opennebula will actually delete the disk files, reclone them and then start the machine on a physical box, basically destroying the original VM.</div>
<div><br></div><div>Is there a way around this behavior?</div><div><br></div><div>My solution for this is something like : </div><div>- executing the hook</div><div>- touch a file in the datastore </div><div>- delete script will check for the existence of that file and skip</div>


<div>- clone script will check for the existence of that file and skip</div><div>- delete that file</div><div>- run machine </div><div><br></div><div>This might be a solution but it is more or less a work around.</div><div>


<br></div><div>Any other ideas? Any way of making my own "resubmit" command that will bypass delete and clone and just run deploy?<br></div><div><br></div><div>Thank you!</div><div><br></div><div>Regards,</div>

<div>
Stefan Catargiu</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Ruben S. Montero, PhD<br>Project co-Lead and Chief Architect<br>OpenNebula - The Open Source Solution for Data Center Virtualization<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a> | @OpenNebula<br>


</div>