Hi Ricardo, Try to use variables in context section, for example you can bind a pseudo-random password using several context variables:
CONTEXT = [ files = "/service/init.sh /service/resolv.conf" hostname = "$NAME-$VMID", ip_private = "$NIC[IP, NETWORK=\"public net\"]", user = oneadmin, user_pw= "MyPass-$NAME-$VMID" ] Hope it helps, -- André Monteiro On Sat, Aug 18, 2012 at 12:01 PM, Ricardo Duarte <[email protected]> wrote: > Hi there, > > I would like to generate a random password for each instance, but it > should be readable/available under Sunstone. > The plan is to slightly modify the virtual machine data table, and add a > new column named "Service Password", or in alternative, users may look for > it under the "Image Template" tab. > What I am missing is how to make the password available to both Sunstone > and the instance, and how to generate it before the machine boots. Looks > like the easier way would be to auto-generate it and add it to CONTEXT. > But how can I do it? Is there any hook I can use to generate a variable > and add them to context, before the machine boots? Or do I have to modify > the OpenNebula C core? > > Thanks. > > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
