[one-users] Instantiate to Persistent

Ruben S. Montero rsmontero at opennebula.org
Tue Feb 19 10:34:04 PST 2013


Hi

Yes, I did not really get the use case here.

So from your email:

"OpenNebula would clone the "source" disk, add it to the machine template
and instantiate the machine when I run onetemplate instantiate.

So far, I can only do this with non-persistent disks, where OpenNebula
clones the source disk into a volatile disk inside system ds."

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.

Or, do you want to implement an special semantics for the clone operation?

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):

#clone image
oneimage clone img new_img

#clone the the template
onetemplate clone tmpl new_tmpl

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

#instantiantiage the new tmpl
onetemplate instantiate new_tmpl

Hope it helps ....

Cheers

Ruben






On Tue, Feb 19, 2013 at 3:17 PM, Ricardo Duarte <rjtd21 at hotmail.com> wrote:

> Hi there,
>
> Any help on this?
>
> Thanks,
> Ricardo
>
> ------------------------------
> From: rjtd21 at hotmail.com
> To: rsmontero at opennebula.org
> Date: Wed, 16 Jan 2013 09:45:44 +0000
> CC: users at lists.opennebula.org
>
> Subject: Re: [one-users] Instantiate to Persistent
>
> Hi Ruben,
>
> I guess I was still not able to express the use case correctly.
>
> - I want to have a template, registered within onetemplate, that generates
> machines with persistent disks, cloned from a master disk
> - The only action I want to do to create the virtual machines is to run
> onetemplate instantiate
> - OpenNebula would clone the "source" disk, add it to the machine template
> and instantiate the machine when I run onetemplate instantiate.
>
> So far, I can only do this with non-persistent disks, where OpenNebula
> clones the source disk into a volatile disk inside system ds.
> I want OpenNebula to clone the disk to the datastore and set it as
> persistent instead.
>
> Is it possible?
>
> Regards,
> Ricardo
>
> ------------------------------
> From: rsmontero at opennebula.org
> Date: Wed, 9 Jan 2013 11:20:00 +0100
> Subject: Re: [one-users] Instantiate to Persistent
> To: rjtd21 at hotmail.com
> CC: users at lists.opennebula.org
>
> OK, I think you can use onevm saveas for this:
>
> http://opennebula.org/documentation:rel3.8:vm_guide_2#disk_operations
>
> Cheers
>
> Ruben
>
>
> On Wed, Jan 9, 2013 at 12:33 AM, Ricardo Duarte <rjtd21 at hotmail.com>wrote:
>
> Hi,
>
> I will try to explain what I am trying to do:
>
> - Say I have a template that uses image id 10, that is not persistent.
> - 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
>
> Currently, when I instantiate a template with a non-persistent image, the
> image is cloned to a volatile disk on system DS.
> 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.
>
> Thanks,
> Ricardo
>
> ------------------------------
> From: rsmontero at opennebula.org
> Date: Tue, 8 Jan 2013 23:57:25 +0100
> Subject: Re: [one-users] Instantiate to Persistent
> To: rjtd21 at hotmail.com
> CC: users at lists.opennebula.org
>
> Hi Ricardo,
>
> 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?
>
> Cheers
>
> Ruben
>
> [1]
> http://opennebula.org/documentation:rel3.8:img_guide#making_images_persistent
>
>
> On Mon, Jan 7, 2013 at 12:32 PM, Ricardo Duarte <rjtd21 at hotmail.com>wrote:
>
> Hi there,
>
> I'm trying to make all my virtual machines persistent.
> So, I would like disks for vms instantiated from templates to be created
> as persistent clones, instead of volatile disks on system DS.
> Is there a way to do it?
>
> Thanks,
> Ricardo
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
>
>
> --
> Ruben S. Montero, PhD
> Project co-Lead and Chief Architect
> OpenNebula - The Open Source Solution for Data Center Virtualization
> www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
>
>
>
>
> --
> Ruben S. Montero, PhD
> Project co-Lead and Chief Architect
> OpenNebula - The Open Source Solution for Data Center Virtualization
> www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
>
> _______________________________________________ Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130219/40fafbbe/attachment-0002.htm>


More information about the Users mailing list