[one-users] Problem while creating VMs

Duverne, Cyrille cyrille.duverne at euranova.eu
Sun Jun 8 02:29:17 PDT 2014


Hello Guys !

I've upgraded to 4.6 and I'm now able to create VMs.
Some questions still :

- When, from sunstone, I want to create a new VM following a template
(4.2 compliant), they are stuck in PENDING state until I click on
"Deploy" -> I've browse the doc without finding precise explanation on
this behaviour of the scheduler.

- Regarding the 4.2 templates, it looks like a lot changed. Find below
my actual template + init.sh, could you tell me ht to change to be 4.6
ready ?

Template :

FEATURES=[ACPI="yes"]
CONTEXT=[HOSTNAME="VM-$VMID",
IP_PUBLIC="$NIC[IP, NETWORK=\"Big Network\"]",
GATEWAY="10.0.3.1",
FILES="/nebuladata/scripts/init.sh",
TARGET="vdb",
DATABLOCK="vdc"]
NIC=[NETWORK="Big Network"]
OS=[ARCH="x86_64",BOOT="hd"]
MEMORY="512"
CPU="0.2"
TEMPLATE_ID="31"
GRAPHICS=[TYPE="vnc",KEYMAP="fr"]
DISK=[IMAGE="Ubuntu10gContexted",TARGET="vda",CACHE="writeback"]
DISK=[SIZE="15000",FORMAT="ext3",TYPE="fs",TARGET="vdc",CACHE="writeback"]

init.sh :

#!/bin/bash

if [ -f /mnt/context/context.sh ]
then
  . /mnt/context/context.sh
fi

#Mount datablock if specified, and change default owner
if [ -n "$DATABLOCK" ]; then
    mount -t ext3 /dev/$DATABLOCK /mnt/data
        #if [ -n "$DISTFS" ]; then
        #fi
    chown enx:enx /mnt/data
fi

#Change hostname by the one specified in context
if [ -n "$HOSTNAME" ]; then
    echo $HOSTNAME > /etc/hostname
    hostname $HOSTNAME
    rm /etc/hosts
    echo 127.0.0.1 localhost > /etc/hosts
    echo 127.0.0.1 $HOSTNAME $HOSTNAME.local >> /etc/hosts
fi

#Specify IP
if [ -n "$IP_PUBLIC" ]; then
    ifconfig eth0 $IP_PUBLIC
fi

#Specify Netmask
if [ -n "$NETMASK" ]; then
    ifconfig eth0 netmask $NETMASK
    echo 'nameserver 192.168.0.1' >> /etc/resolv.conf
fi

#Specify Gateway
if [ -n "$GATEWAY" ]; then
    route add default gw $GATEWAY eth0
    service networking restart
fi

I understood that a lot changed, and the new layout is pretty sexy,
I'm acking of some upgrade guidance for custom developments, e.g : "If
you were using this kind of CONTEXT, you should use that instead"

Thanks in advance for your help !
CyD

At Friday, 06/06/2014 on 18:45 Duverne, Cyrille wrote:

Hello !

I'm facing a strange behaviour, when creating a new VM I get : 

Fri Jun 6 18:15:19 2014 [DiM][I]: New VM state is ACTIVE.
Fri Jun 6 18:15:20 2014 [LCM][I]: New VM state is PROLOG.
Fri Jun 6 18:15:20 2014 [TM][I]: Command execution fail:
/var/lib/one/remotes/tm/shared/clone
inferno:/var/lib/one/datastores/1/b241670f66f9589d3c22afcc708c75c3
orthanc.local:/var/lib/one/datastores/0/283/disk.0 283 1
Fri Jun 6 18:15:20 2014 [TM][I]: sh: 1:
/var/lib/one/remotes/tm/shared/clone: not found
Fri Jun 6 18:15:20 2014 [TM][I]: ExitCode: 127
Fri Jun 6 18:15:20 2014 [TM][E]: Error executing image transfer script
Fri Jun 6 18:15:21 2014 [DiM][I]: New VM state is FAILED

As you can see /var/lib/one/remotes/tm/shared/clone isn't found.
Indeed there is no clone file in this directory :

oneadmin at inferno:/nebuladata/one-data/remotes/tm$ ls shared
cpds  mkimage  mkswap  postmigrate  premigrate

Some help here could be great !

Thanks
Cyrille


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140608/6d1b8069/attachment.htm>


More information about the Users mailing list