Re: [one-users] libvirt permissions issue:
Try to add this lines to the /etc/libvirt/qemu.conf user = "oneadmin" group = "oneadmin" dynamic_ownership = 0 2014-04-03 6:27 GMT+12:00 Steven Timm : > > This is about a test OpenNebula 4.4 installation but we have the same > problem in OpenNebula 3.2 and have been kludging around it. > > Head node and hypervisors, scientific linux 6, > libvirt qemu.conf has dynamic_ownership=0 as recommended in the guide. > > non-default libvirt settings in libvirt.conf > > unix_sock_group = "libvirtd" > unix_sock_ro_perms = "0777" > unix_sock_rw_perms = "0770" > auth_unix_ro = "none" > auth_unix_rw = "none" > log_level = 2 > log_outputs = "2:syslog:libvirtd" > host_uuid = "1f31bfac-97e1-5ecb-83ab-0e2c2819db1c" > > [root@fgtest11 ~]# rpm -q libvirt > libvirt-0.10.2-29.el6_5.3.x86_64 > [root@fgtest11 ~]# rpm -q qemu-kvm > qemu-kvm-0.12.1.2-2.415.el6.x86_64 > --- > > our datastore is using ssh-based transport > so that we have a system datastore on each VM host > What we see as the system brings the file over is that disk.0 is owned > by oneadmin with permissions 644. > > Given that our libvirt runs things as qemu, the qemu does not have enough > permissions to actually read/write the disk.0 > > (qemu user is in the oneadmin group, but the file is not group readable). > > We have been kludging this by just adding a chmod 660 to the tm_clone.sh > script but there must be a better way. > > Steve Timm > > -- > Steven C. Timm, Ph.D (630) 840-8525 > t...@fnal.gov http://home.fnal.gov/~timm/ > Fermilab Scientific Computing Division, Scientific Computing Services Quad. > Grid and Cloud Services Dept., Associate Dept. Head for Cloud Computing > ___ > 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
[one-users] libvirt permissions issue:
This is about a test OpenNebula 4.4 installation but we have the same problem in OpenNebula 3.2 and have been kludging around it. Head node and hypervisors, scientific linux 6, libvirt qemu.conf has dynamic_ownership=0 as recommended in the guide. non-default libvirt settings in libvirt.conf unix_sock_group = "libvirtd" unix_sock_ro_perms = "0777" unix_sock_rw_perms = "0770" auth_unix_ro = "none" auth_unix_rw = "none" log_level = 2 log_outputs = "2:syslog:libvirtd" host_uuid = "1f31bfac-97e1-5ecb-83ab-0e2c2819db1c" [root@fgtest11 ~]# rpm -q libvirt libvirt-0.10.2-29.el6_5.3.x86_64 [root@fgtest11 ~]# rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.415.el6.x86_64 --- our datastore is using ssh-based transport so that we have a system datastore on each VM host What we see as the system brings the file over is that disk.0 is owned by oneadmin with permissions 644. Given that our libvirt runs things as qemu, the qemu does not have enough permissions to actually read/write the disk.0 (qemu user is in the oneadmin group, but the file is not group readable). We have been kludging this by just adding a chmod 660 to the tm_clone.sh script but there must be a better way. Steve Timm -- Steven C. Timm, Ph.D (630) 840-8525 t...@fnal.gov http://home.fnal.gov/~timm/ Fermilab Scientific Computing Division, Scientific Computing Services Quad. Grid and Cloud Services Dept., Associate Dept. Head for Cloud Computing ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Opennebula template Push root password.
Hi Leszek, I don't understand either why it's not working for you then, the only explanation is that the image is not correct. Could you try with another image? I think that would the easiest option. Another option would be to open that image and replace the root password manually. To do so, this is what I usually do: 1) figure out the start of the partition: $ OFFSET=$(parted /path/to/image 'unit B print' 2>/dev/null | awk '{if($1=="1"){print $2}}'|tr -cd 0-9) 2) mount the image: $ mkdir -p mnt $ sudo mount -o loop,offset=$OFFSET mnt 3) generate the hashed password $ openssl passwd -1 $1$pkKjWlHt$2Qe6M8C6hDJ.XOG2qAmXs. 4) edit mnt/etc/shadow and replace replace the root:..: part of that file with the new generated password, like such: root:$1$pkKjWlHt$2Qe6M8C6hDJ.XOG2qAmXs.:16041:0:9:7::: 5) unmount the image: sudo umount mnt although to be honest another image might be a better bet. Did you get this one from the marketplace? On Wed, Apr 2, 2014 at 4:33 PM, Leszek Master wrote: > i'm trying to ssh from node-02 using leni account (leni@node-02) as in > the ssh-key added to template. And i've got password prompt, the same is > when i use ssh root@172.100.0.109 - password prompt. It should but it > isn't :( > > > 2014-04-02 16:29 GMT+02:00 Jaime Melis : > > That should work. Just so we're clear, you're trying to ssh from the >> oneadmin account in node02 to the *root* account of the VM: >> >> oneadmin@node-02:~ $ ssh root@172.100.0.109 >> >> Do you even get the password prompt? >> >> -- >> 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
Re: [one-users] Opennebula template Push root password.
i'm trying to ssh from node-02 using leni account (leni@node-02) as in the ssh-key added to template. And i've got password prompt, the same is when i use ssh root@172.100.0.109 - password prompt. It should but it isn't :( 2014-04-02 16:29 GMT+02:00 Jaime Melis : > That should work. Just so we're clear, you're trying to ssh from the > oneadmin account in node02 to the *root* account of the VM: > > oneadmin@node-02:~ $ ssh root@172.100.0.109 > > Do you even get the password prompt? > > -- > 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
Re: [one-users] Opennebula template Push root password.
That should work. Just so we're clear, you're trying to ssh from the oneadmin account in node02 to the *root* account of the VM: oneadmin@node-02:~ $ ssh root@172.100.0.109 Do you even get the password prompt? -- 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
Re: [one-users] Opennebula template Push root password.
I havent tryied them before. Now i checked this. It has never worked. onevm show 36: USER 2 INFORMATION ID : 2 NAME: leni GROUP : oneadmin PASSWORD: dasa2d2bc9d8dasda98213cd2abd5f505bc9 AUTH_DRIVER : core ENABLED : Yes USER TEMPLATE TOKEN_PASSWORD="e709sna769625921asdasd13f0a1857ee72c4a" RESOURCE USAGE & QUOTAS NUMBER OF VMS MEMORY CPU VOLATILE_SIZE 4 / 05G / 0M 4.00 / 0.000M / 0M DATASTORE ID IMAGESSIZE 100 3 /0 11G / 0M 2 1 /0 1M / 0M NETWORK ID LEASES 6 4 /0 IMAGE ID RUNNING VMS 3 3 /0 8 1 /0 oneadmin@node-02:/home/leni/.ssh$ oneuser show 36 [UserInfo] Error getting user [36]. oneadmin@node-02:/home/leni/.ssh$ onevm show 36 VIRTUAL MACHINE 36 INFORMATION ID : 36 NAME: aha USER: leni GROUP : oneadmin STATE : ACTIVE LCM_STATE : RUNNING RESCHED : No HOST: node-02 CLUSTER ID : -1 START TIME : 04/02 16:11:07 END TIME: - DEPLOY ID : one-36 VIRTUAL MACHINE MONITORING NET_TX : 12K USED MEMORY : 1024M USED CPU: 0 NET_RX : 17K PERMISSIONS OWNER : um- GROUP : --- OTHER : --- VM DISKS ID TARGET IMAGE TYPE SAVE SAVE_AS 0 hdaUbuntu Server 12.04 - kvm rbdNO - VM NICS ID NETWORK VLAN BRIDGE IP MAC 0 Net_172.100.0.0no br0 172.100.0.109 02:00:ac:64:00:6d fe80::400:acff:fe64:6d VIRTUAL MACHINE HISTORY SEQ HOSTACTION DS STARTTIME PROLOG 0 node-02 none0 04/02 16:11:16 0d 00h10m 0h01m49s USER TEMPLATE SCHED_REQUIREMENTS="ID=\"1\"" VIRTUAL MACHINE TEMPLATE AUTOMATIC_REQUIREMENTS="!(PUBLIC_CLOUD = YES)" CONTEXT=[ DISK_ID="1", ETH0_DNS="192.168.8.213", ETH0_GATEWAY="172.100.0.1", ETH0_IP="172.100.0.109", ETH0_MAC="02:00:ac:64:00:6d", ETH0_MASK="255.255.255.0", ETH0_NETWORK="172.100.0.0", NETWORK="YES", SSH_PUBLIC_KEY="ssh-rsa B3NzaC1yc2EDAQABAAABAQDJOJn8hKf3Q/775viiGAS/NbC1K+ws/X1fUZvddasTB3JDVVVyBjU5HRqrZTqlq3dINKTIGNPXsM/gBZJN/RJVZi7BRw7P7QCtPCIHaq1MAYu4xxKsGd3XJsZOhnEHhUPjnxQ/fZzz3HjXuXSgrIHNMtsEhYJU3dM89czGUN/xd3eI0ZelEv2OSbxy8F70ZbEY8p5MVMShgWrwnWx4Nka1YZV1ROyHyfl9nKhLjye4JQuye4kACdiBoTdkCowCOU4iU2itNXWQXKLkrAQ4jkKZBAX4OY9gZXuvardkbbVSkKzCRW4W/drKhaXe4nZnf2jiYS+Q4ItuQQRJTCMABjnH leni@node-02", TARGET="hdb" ] CPU="1" GRAPHICS=[ LISTEN="0.0.0.0", PORT="5936", TYPE="VNC" ] MEMORY="1024" OS=[ ARCH="x86_64" ] TEMPLATE_ID="2" VCPU="1" VMID="36" oneuser show: USER 2 INFORMATION ID : 2 NAME: leni GROUP : oneadmin PASSWORD: 24ba2d2bc9d8dc0aea7c8asd5f505bc9 AUTH_DRIVER : core ENABLED : Yes USER TEMPLATE TOKEN_PASSWORD="e70daa769625921zxcde1b0a1857ee72c4a" RESOURCE USAGE & QUOTAS NUMBER OF VMS MEMORY CPU VOLATILE_SIZE 4 / 05G / 0M 4.00 / 0.000M / 0M DATASTORE ID IMAGESSIZE 100 3 /0 11G / 0M 2 1 /0 1M / 0M NETWORK ID LEASES 6 4 /0 IMAGE ID RUNNING VMS 3 3 /0 8 1 / ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Opennebula template Push root password.
Hi, are you saying before trying to use a init.sh the ssh-keys did work, and after they don't? Have you tried removing the init.sh option from the template again see if you regain ssh access, or it has never worked? If it hasn't, please send us: onevm show and oneuser show On Wed, Apr 2, 2014 at 4:02 PM, Leszek Master wrote: > 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 : > > 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 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 : >>> >>> 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 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 : > >> 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 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 > > -- 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
Re: [one-users] Opennebula template Push root password.
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 : > 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 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 : >> >> 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 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 : > 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 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
Re: [one-users] Opennebula template Push root password.
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 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 : > > 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 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 : >>> 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 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
Re: [one-users] Opennebula template Push root password.
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 : > 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 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 : >> >>> 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 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
Re: [one-users] Opennebula template Push root password.
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 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 : > >> 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 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
Re: [one-users] Opennebula template Push root password.
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 : > 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 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
Re: [one-users] Opennebula template Push root password.
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 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
[one-users] Opennebula template Push root password.
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
Re: [one-users] Opennebula problem with cephdatastore.
Try to start qemu directly on the node-02 (on oneadmin user): virsh --connect qemu:///system create /var/lib/one//datastores/0/3/deployment.3 and see errors. 2014-04-01 0:27 GMT+12:00 Leszek Master : > I want to use ceph with opennebula as datastore. I've created ceph datastore > using manual - > http://archives.opennebula.org/documentation:archives:rel4.0:ceph_ds and i > can see datastore space usage and i can import there image form market > place, but i cannot start the VM from this image. The error is: Error > deploying virtual machine: Could not create domain from > /var/lib/one//datastores/0/3/deployment.3 > > In the log i can see this: http://pastebin.com/9bUpxh1t > > When i use "cat << EOT | /var/tmp/one/vmm/kvm/deploy > '/var/lib/one//datastores/0/3/deployment.3' 'node-02' 3 node-02" in my > node-02 server i can see > > http://pastebin.com/LbxqAEtV > > My datastore config: > > http://pastebin.com/QSqTBX6u > > And my vm template: > > http://pastebin.com/Gi72rwa3 > > I also have seen situation where file > /var/lib/one/datastores/0/3/deployment.3 is not empty, but the data from it > disappear few seconds after Failed to creating VM. > > Please help me solve out my problem. > > ___ > 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
Re: [one-users] Problem boot VM template with opennebula
Hi, actually I specify the port manually. and there is no other service using port 5902. I should do in my template to enable VNC OpenNebula autonomously? Regards. Javier. --- Javier Cuquerella Sánchez javier.cuquere...@atos.net Atos Research & Innovation Systems Administrator Albarracin 25 28037-Madrid (SPAIN) Tfno: +34.91.214.8080 www.atosresearch.eu es.atos.net -Original Message- From: Javier Fontan [mailto:jfon...@opennebula.org] Sent: Tuesday, April 01, 2014 3:38 PM To: Cuquerella Sanchez, Javier Cc: users@lists.opennebula.org Subject: Re: Problem boot VM template with opennebula Are you specifying the port manually. It may be that there's another VM already using that port. Do not set it, let OpenNebula chose one for you. If this does not work try also unsetting the keymap. I can not think of any other problem with that. On Tue, Apr 1, 2014 at 11:43 AM, Cuquerella Sanchez, Javier wrote: > Hi, > > I have instantiated the machine, removing and setting parameters and end the > problem is on the line of the VNC: > > GRAPHICS=[ KEYMAP=es, LISTEN=0.0.0.0, PORT=5902, > TYPE=vnc ] > > If I remove the template the machine boots into Xen and opennebula > and I access the virtual machine using the command > > xm console IDMachine > > The template instantiate is: > > [root@VTSS003 CUQUE]# cat VMencourageprueba4.tmpl > NAME = Encourageprueba4 > MEMORY = 4096 > CPU= 1 > OS=[ KERNEL = "/boot/vmlinuz-2.6.32-279.el6.x86_64", INITRD = > "/boot/initramfs-2.6.32-279.el6.x86_64.img", root = "xvda1" ] DISK =[ > DRIVER="file:", IMAGE_ID="29", TARGET="xvda1" ] DISK =[ TYPE = > "swap", SIZE = 1024, TARGET = "sdb" ] NIC = [ NETWORK_ID = 3 ] RAW=[ > DATA="device_model='/usr/lib64/xen/bin/qemu-dm'", TYPE=xen ] > > And the deployment created: > > [root@VTSS003 124]# cat deployment.0 > name = 'one-124' > #O CPU_CREDITS = 256 > memory = '4096' > kernel = '/boot/vmlinuz-2.6.32-279.el6.x86_64' > ramdisk = '/boot/initramfs-2.6.32-279.el6.x86_64.img' > root = '/dev/xvda1' > disk = [ > 'file:/var/lib/one//datastores/0/124/disk.0,xvda1,w', > 'tap:aio:/var/lib/one//datastores/0/124/disk.1,sdb,w', > ] > vif = [ > ' mac=02:00:5f:d3:e8:04,ip=95.211.232.4,bridge=br0', > ] > device_model='/usr/lib64/xen/bin/qemu-dm' > > > can you see any error on line to VNC: GRAPHICS=[ KEYMAP=es, LISTEN=0.0.0.0, > PORT=5902, TYPE=vnc ] > > regards. > Javier. > > --- > Javier Cuquerella Sánchez > > javier.cuquere...@atos.net > Atos Research & Innovation > Systems Administrator > Albarracin 25 > 28037-Madrid (SPAIN) > Tfno: +34.91.214.8080 > www.atosresearch.eu > es.atos.net > > > -Original Message- > From: Javier Fontan [mailto:jfon...@opennebula.org] > Sent: Wednesday, March 26, 2014 4:19 PM > To: Cuquerella Sanchez, Javier > Cc: users@lists.opennebula.org > Subject: Re: Problem boot VM template with opennebula > > Let's try taking out a couple of parameters. KERNEL_CMD, swap disk, > device_model and VNC. I'm using the template you provided in a previous email: > > NAME = Encourage7 > MEMORY = 4096 > CPU= 1 > OS=[ KERNEL = "/boot/vmlinuz-2.6.32-279.el6.x86_64", INITRD = > "/boot/initramfs-2.6.32-279.el6.x86_64.img", root = "xvda1" ] DISK =[ > DRIVER="file:", IMAGE_ID="27", TARGET="xvda1" ] NIC = [ NETWORK_ID = 3 > ] > > In case this works you can start adding some other parameters. I'll start > with the swap disk. > > On Wed, Mar 26, 2014 at 3:55 PM, Cuquerella Sanchez, Javier > wrote: >> Hi, >> >> The deployment file generated by OpenNebula is: >> >> [root@VTSS003 114]# cat deployment.0 >> name = 'one-114' >> #O CPU_CREDITS = 256 >> memory = '4096' >> kernel = '/boot/vmlinuz-2.6.32-279.el6.x86_64' >> ramdisk = '/boot/initramfs-2.6.32-279.el6.x86_64.img' >> root = '/dev/xvda1' >> extra = 'ro xencons=tty console=tty1' >> disk = [ >> 'file:/var/lib/one//datastores/0/114/disk.0,xvda1,w', >> 'tap:aio:/var/lib/one//datastores/0/114/disk.1,sdb,w', >> ] >> vif = [ >> ' mac=02:00:5f:d3:e8:04,ip=95.211.232.4,bridge=br0', >> ] >> vfb = ['type=vnc,vnclisten=0.0.0.0,vncdisplay=2,keymap=es'] >> device_model='/usr/lib64/xen/bin/qemu-dm' >> >> >> Thanks >> >> Regards >> >> --- >> Javier Cuquerella Sánchez >> >> javier.cuquere...@atos.net >> Atos Research & Innovation >> Systems Administrator >> Albarracin 25 >> 28037-Madrid (SPAIN) >> Tfno: +34.91.214.8080 >> www.atosresearch.eu >> es.atos.net >> >> >> -Original Message- >> From: Javier Fontan [mailto:jfon...@opennebula.org] >> Sent: Monday, March 24, 2014 6:43 PM >> To: Cuquerella Sanchez, Javier >> Cc: users@lists.opennebula.org >> Subject: Re: Problem boot VM template with opennebula >> >> Can you send us the deployment file generated by OpenNebula? Just to >> check if there is something too different to your deployment file. It >> should be located in you fronten