Now i see i can't even log to my VM using ssh-keys added to template. I need to do something more with image downloaded form market place to get this working?
2014-04-02 15:32 GMT+02:00 Jaime Melis <jme...@opennebula.org>: > Try adding a debugging line to the script, like: > > echo "ROOT_PASSWORD: $ROOT_PASSWORD and PASS: $PASS" > /tmp/debug > > after booting take a look at the /tmp/debug contents > > > On Wed, Apr 2, 2014 at 3:31 PM, Leszek Master <keks...@gmail.com> wrote: > >> It still doesn't work :(. Can i see is init.sh executed in my VM? >> >> >> >> 2014-04-02 15:16 GMT+02:00 Jaime Melis <jme...@opennebula.org>: >> >> You should decode the ROOT_PASSWORD inside that script, something in the >>> lines of: >>> >>> #!/bin/bash >>> PASS=$(echo "$ROOT_PASSWORD" | base64 -d) >>> usermod -p "$PASS" root >>> >>> >>> On Wed, Apr 2, 2014 at 3:13 PM, Leszek Master <keks...@gmail.com> wrote: >>> >>>> I'm trying to do this on ubuntu, i did what you said i've created file >>>> names init.sh upload it to Files and named there init.sh too. Next i >>>> applied it to template ($FILE[IMAGE_ID=10]) added ROOT_PASSWORD base 64 >>>> encoded and it doesn't work :( >>>> >>>> My init.sh: >>>> >>>> #!/bin/bash >>>> usermod -p "$ROOT_PASSWORD" root >>>> >>>> But it didn't work. >>>> >>>> >>>> 2014-04-02 11:37 GMT+02:00 Jaime Melis <jme...@opennebula.org>: >>>> >>>>> Leszek, >>>>> >>>>> Create a script, call it "init.sh", upload it to the Files & Kernel >>>>> tab (as a Context type). Select it under the Context -> Files section of >>>>> the VM Template. >>>>> >>>>> Whatever you put inside that init.sh script will get executed. >>>>> >>>>> The contents of the script depend on the distro you are using, but if >>>>> you're using CentOS 6, for instance, you might want to write something >>>>> like >>>>> this: >>>>> >>>>> > #!/bin/bash >>>>> > echo "root:$ROOT_PASSWORD" | passwd >>>>> >>>>> And then you can specify the custom variable ROOT_PASSWORD in the VM >>>>> Template. >>>>> >>>>> Please note that it's recommended to use base64 encoding for this >>>>> type of things, since otherwise it might lead to character problems. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Apr 2, 2014 at 11:09 AM, Leszek Master <keks...@gmail.com>wrote: >>>>> >>>>>> How can i push root password to a VM for example using context? >>>>>> >>>>>> _______________________________________________ >>>>>> Users mailing list >>>>>> Users@lists.opennebula.org >>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Jaime Melis >>>>> Project Engineer >>>>> OpenNebula - Flexible Enterprise Cloud Made Simple >>>>> www.OpenNebula.org | jme...@opennebula.org >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@lists.opennebula.org >>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >>>> >>>> >>> >>> >>> -- >>> Jaime Melis >>> Project Engineer >>> OpenNebula - Flexible Enterprise Cloud Made Simple >>> www.OpenNebula.org | jme...@opennebula.org >>> >> >> >> _______________________________________________ >> Users mailing list >> Users@lists.opennebula.org >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> >> > > > -- > Jaime Melis > Project Engineer > OpenNebula - Flexible Enterprise Cloud Made Simple > www.OpenNebula.org | jme...@opennebula.org >
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org