Hi, When the VM is created, the template contents are parsed and stored in VM/TEMPLATE. All the extra unknown attributes are stored in VM/USER_TEMPLATE. You can see this with the onevm show -x command. The onevm update action only allows to edit the USER_TEMPLATE attributes, and as you described, the create hook is triggered after the VM has been correctly created.
I don't see any easy way to make your work flow fit into OpenNebula. Could you elaborate a bit more on your use case? I'm assuming you want those two variables to end in the context section of the VM. In that case the preferred way to do so would be to have a VM Template for each Image, and in there set the needed variables. Regards -- Carlos Martín, MSc Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | cmar...@opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmar...@opennebula.org> On Tue, Nov 26, 2013 at 8:41 AM, Olivier Sallou <olivier.sal...@irisa.fr>wrote: > Hi, > > If my VM HOOK (on CREATE) adds new elements with a onevm update, I can see > those variables in the the "user template" of the vm/ > > onevm show: > > .... > USER > TEMPLATE > SSH_PUBLIC_KEY="ssh-rsa......" > XGRID_PWD="xxx" > .... > > In my image template, I have set: > > SSH_PUBLIC_KEY $USER[SSH_PUBLIC_KEY] XGRID_PWD $USER[XGRID_PWD] > But in the VM template, I do not see any of those variable. > > It would seem that user template attributes are created *after* the vm > template generation. > > Any idea ? > > Thanks > > Olivier > > > > _______________________________________________ > Users mailing list > Users@lists.opennebula.org > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org