[one-users] Ruby oca - change templates

Robert Parrott parrott at seas.harvard.edu
Tue Nov 1 05:51:15 PDT 2011


Hi Paulo,

One thing that we've done is to use "onetemplate" to store a template
" template", i.e. a template that has fields in the context that are
placeholder tokens. Then we've wrapped the deploy command line with a
script that will pull the contents of the template, modify it in
place, and then feed it into the onevm create command. If you set
"EDITOR=cat" in your shell and then do a "onetemplate update", the
contents of the template will be written to stdout. A few well placed
"sed" commands can customize that template dynamically for your needs
(for example we specify a public key to add, and a local user account
to create based on the currently login name).

Rob


On Mon, Oct 31, 2011 at 11:41 AM, Paulo A L Rego <pauloalr.alu at gmail.com> wrote:
> Hi,
> is it possible to change the virtual machine's template while the vm is in
> pending state?
>
> We can see the template by using vm.template_str and the xml using
> vm.to_xml.
> Can we update the template or the xml before deploying?
> I would like to update the name and/or include other fields at template.
> Thanks a lot.
> Paulo Rego
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



-- 
Robert E. Parrott, Ph.D. (Phys. '06)
Director, Academic Computing
Harvard University Sch. of Eng. and App. Sci.
Maxwell-Dworkin  211,
33 Oxford St.
Cambridge, MA 02138
(617)-496-1520


More information about the Users mailing list