<div dir="ltr">Hi<div><br></div><div style>Yes, I did not really get the use case here.</div><div style><br></div><div style>So from your email:</div><div style><br></div><div style>"OpenNebula would clone the "source" disk, add it to the machine template and instantiate the machine when I run onetemplate instantiate.</div>

<div style><div><br></div><div>So far, I can only do this with non-persistent disks, where OpenNebula clones the source disk into a volatile disk inside system ds."</div><div><br></div><div style>I think that we are unsing the same word for different things. OpenNebula will clone any non-persistent images, (that is the way to keep the image untouched). But you need to clone a persistent image, right? Why not changing the image to non-persistent then?. If you need to clone but preserve the changes you can save_as the image, or maybe stop / resume the VM.</div>

<div style><br></div><div style>Or, do you want to implement an special semantics for the clone operation? </div><div style><br></div><div style>Or maybe you want to take a template using an image, copy that image make it persistent and create a VM using the original VM but with the copied image? Something like (assuming img and tmpl are the image and template you are interested in):</div>

<div style><br></div><div style>#clone image</div><div style>oneimage clone img new_img</div><div style><br></div><div style>#clone the the template</div><div style>onetemplate clone tmpl new_tmpl</div><div style><br></div>

<div style>#change base disk in the new_tmpl, hakish I know </div><div style> EDITOR="sed -i 's/IMAGE=\"img\"/IMAGE=\"new_img\"/g'"<br></div><div style>onetemplate update new_tmpl</div>

<div style><br></div><div style>#instantiantiage the new tmpl</div><div style>onetemplate instantiate new_tmpl</div><div style><br></div><div style>Hope it helps ....</div><div style><br></div><div style>Cheers</div><div style>

<br></div><div style>Ruben</div><div style><br></div><div style><br></div><div style><br></div><div style><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 3:17 PM, Ricardo Duarte <span dir="ltr"><<a href="mailto:rjtd21@hotmail.com" target="_blank">rjtd21@hotmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hi there,<br><br>Any help on this?<br><br>Thanks,<br>Ricardo<br><div class="hm HOEnZb"><br></div><div><div class="hm HOEnZb"><div></div><hr>From: <a href="mailto:rjtd21@hotmail.com" target="_blank">rjtd21@hotmail.com</a><br>

To: <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a><br>Date: Wed, 16 Jan 2013 09:45:44 +0000<br>CC: <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a></div>

<div><div class="h5"><br>Subject: Re: [one-users] Instantiate to Persistent<br><br>


<div dir="ltr">Hi Ruben,<div><br></div><div>I guess I was still not able to express the use case correctly.</div><div><br></div><div>- I want to have a template, registered within onetemplate, that generates machines with persistent disks, cloned from a master disk</div>

<div>- The only action I want to do to create the virtual machines is to run onetemplate instantiate</div><div>- OpenNebula would clone the "source" disk, add it to the machine template and instantiate the machine when I run onetemplate instantiate.</div>

<div><br></div><div><div><span style="font-size:12pt">So far, I can only do this with non-persistent disks, where OpenNebula clones the source disk into a volatile disk inside system ds.</span></div></div><div>I want OpenNebula to clone the disk to the datastore and set it as persistent instead.</div>

<div><br></div><div>Is it possible?</div><div><br></div><div><span style="font-size:12pt">Regards,</span></div><div>Ricardo<br><br><div><div></div><hr>From: <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a><br>

Date: Wed, 9 Jan 2013 11:20:00 +0100<br>Subject: Re: [one-users] Instantiate to Persistent<br>To: <a href="mailto:rjtd21@hotmail.com" target="_blank">rjtd21@hotmail.com</a><br>CC: <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br>

<br><div dir="ltr">OK, I think you can use onevm saveas for this:<div><br></div><div><a href="http://opennebula.org/documentation:rel3.8:vm_guide_2#disk_operations" target="_blank">http://opennebula.org/documentation:rel3.8:vm_guide_2#disk_operations</a></div>



<div><br></div><div>Cheers</div><div><br></div><div>Ruben</div></div><div><br><br><div>On Wed, Jan 9, 2013 at 12:33 AM, Ricardo Duarte <span dir="ltr"><<a href="mailto:rjtd21@hotmail.com" target="_blank">rjtd21@hotmail.com</a>></span> wrote:<br>



<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hi,<br><br>I will try to explain what I am trying to do:<br><br>- Say I have a template that uses image id 10, that is not persistent.<br>- Every time a user creates a new image with this template, I want the image id 10 to be cloned into a new persistent image, that is then allocated to the instance<br>



<br>Currently, when I instantiate a template with a non-persistent image, the image is cloned to a volatile disk on system DS.<br>To create a persistent instance, I need to manually clone the image, then make the clone persistent, then create a new template that points to it.<br>



<br>Thanks,<br>Ricardo<br><br><div><div></div><hr>From: <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a><br>Date: Tue, 8 Jan 2013 23:57:25 +0100<br>Subject: Re: [one-users] Instantiate to Persistent<br>



To: <a href="mailto:rjtd21@hotmail.com" target="_blank">rjtd21@hotmail.com</a><br>CC: <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br><br><div dir="ltr">Hi Ricardo,<div><br></div>



<div>We are missing something here,  I think that a persistent image is what you are looking for [1]. If not could you elaborate a bit what are you missing?</div><div><br>

</div><div>Cheers</div><div><br></div><div>Ruben</div><div><br></div><div>[1] <a href="http://opennebula.org/documentation:rel3.8:img_guide#making_images_persistent" target="_blank">http://opennebula.org/documentation:rel3.8:img_guide#making_images_persistent</a></div>





</div><div><br><br><div>On Mon, Jan 7, 2013 at 12:32 PM, Ricardo Duarte <span dir="ltr"><<a href="mailto:rjtd21@hotmail.com" target="_blank">rjtd21@hotmail.com</a>></span> wrote:<br>

<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hi there,<br><br>I'm trying to make all my virtual machines persistent.<br>So, I would like disks for vms instantiated from templates to be created as persistent clones, instead of volatile disks on system DS.<br>





Is there a way to do it?<br><br>Thanks,<br>Ricardo<br>                                    </div></div>
<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><br>
<br></blockquote></div><span><font color="#888888"><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
</font></span></div></div>                                        </div></div>
</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
</div></div></div>                                      </div>
<br>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a></div></div></div>                                     </div></div>
</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
</div>