[one-users] CONTEXT Issue with Vmware

Valentin Bud valentin.bud at gmail.com
Mon Oct 17 02:41:41 PDT 2011


Hello Bharat,

 "Mon Oct 17 14:01:44 2011 [TM][I]: COMMAND not found: CONTEXT
/var/lib/one/var/13/context.sh
ESXI:/var/lib/one/var/images/13/images/disk.1."

About the above error, a little bit of theory first. Each transfer manager
has its configuration stored in
/etc/one/tm_(TransferManagerName)/tm_(TransferManagerName).conf. For example
the shared transfer manager stores its configuration file in
/etc/one/tm_shared/tm_shared.conf, the ssh one in
/etc/one/tm_ssh/tm_ssh.conf. In that configuration file there is the
variable CONTEXT which points to a shell script that actually does the work
of creating the contextualization iso.

You'll notice, for example at tm_shared driver that the CONTEXT variable
points to "shared/tm_context.sh". The place where you find the actual script
depends on your installation type - self contained or system wide. If it's
self contained you'll find the script
in $ONE_LOCATION/lib/tm_commands/$CONTEXT. If it's system wide you can find
it in /usr/lib/one/tm_commands/$CONTEXT.

Depending on your Transfer Manager driver, take a look at that script and
see what it does and why does it fail.

Anyway, something similar happened to me a few weeks ago, when I've first
installed ONe3.0 and started to use the contextualization method. My install
is on Debian Squeeze and it seems that the package mkisofs changed it's name
into genisoimage. With this change the binary name changed also from mkisofs
to genisoimage. The contextualization feature was failing because it
couldn't find the mkisofs binary. Making a symlink of mkisofs to genisoimage
solved my problem. Ohh and by the way, if your system doesn't provide
mkisofs/genisoimage you have to install it. Debian standard install doesn't
have mkisofs installed.

Note to developers: If mkisofs changed name and all Linux distro are now
providing only genisoimage package wouldn't be nice to change the MKISOFS
variable from /usr/lib/one/sh/scripts_common.sh to the new name of the
binary - genisoimage. Yes, I know we can do that by our selfs after
installation, or make a symlink, but I think this thing could ease the life
of a ONe newcomer :).

Have a great day,
v

On Mon, Oct 17, 2011 at 12:13 PM, Bharat Bagai <bagai_bharat at hotmail.com>wrote:

>  Hi Tino
>
> Few days back, I write following query in this forum & you advised me to
> upgrade with OpenNebula ver. 3.0. Now, i had upgraded to stable version of
> OpenNebula ver. 3.0 but when i tried the following scenario passing CONTEXT
> Values with VMware, still i am getting following error.
>
> *one.vm
> *
> NAME   = ttylinux-vm-05
> VCPU    = 1
> MEMORY = 512
> DISK   = [ IMAGE_ID="4" ]
> NIC    = [ NETWORK_ID=0 ]
> CONTEXT = [
> hostname   = "testcentos",
> ip_private = 172.168.0.4,
> dns        = 172.168.0.1
>  ]
>
> *VM.log*
>
> tail -f /var/lib/one/var/13/vm.log
> Mon Oct 17 14:01:13 2011 [DiM][I]: New VM state is ACTIVE.
> Mon Oct 17 14:01:13 2011 [LCM][I]: New VM state is PROLOG.
> Mon Oct 17 14:01:44 2011 [TM][D]: tm_clone.sh:
> FrontEND:/var/lib/one/var/images/ae2ecc9113497f5e7ca34d0f6ce39591
> ESXI:/var/lib/one/var/images/13/images/disk.0
> Mon Oct 17 14:01:44 2011 [TM][D]: tm_clone.sh: DST:
> /var/lib/one/var/images/13/images/disk.0
> Mon Oct 17 14:01:44 2011 [TM][I]: tm_clone.sh: Creating directory
> /var/lib/one/var/images/13/images
> Mon Oct 17 14:01:44 2011 [TM][I]: tm_clone.sh: Executed "mkdir -p
> /var/lib/one/var/images/13/images".
> Mon Oct 17 14:01:44 2011 [TM][I]: tm_clone.sh: Executed "chmod a+w
> /var/lib/one/var/images/13/images".
> Mon Oct 17 14:01:44 2011 [TM][I]: tm_clone.sh: Cloning
> /var/lib/one/var/images/ae2ecc9113497f5e7ca34d0f6ce39591/images
> Mon Oct 17 14:01:44 2011 [TM][I]: tm_clone.sh: Executed "cp -r
> /var/lib/one/var/images/ae2ecc9113497f5e7ca34d0f6ce39591
> /var/lib/one/var/images/13/images/disk.0".
> Mon Oct 17 14:01:44 2011 [TM][I]: tm_clone.sh: Executed "chmod a+rw
> /var/lib/one/var/images/13/images/disk.0".
> Mon Oct 17 14:01:44 2011 [TM][I]: ExitCode: 0
> Mon Oct 17 14:01:44 2011 [TM][I]: COMMAND not found: CONTEXT
> /var/lib/one/var/13/context.sh
> ESXI:/var/lib/one/var/images/13/images/disk.1.
> Mon Oct 17 14:01:44 2011 [TM][E]: Error excuting image transfer script:
> COMMAND not found: CONTEXT /var/lib/one/var/13/context.sh
> ESXI:/var/lib/one/var/images/13/images/disk.1.
> Mon Oct 17 14:01:44 2011 [DiM][I]: New VM state is FAILED
>
>
> Rest of the scenario is same. Still needs any more information, pls let me
> know.
>
>
> (Bharat)
>
>
> > From: tinova79 at gmail.com
> > Date: Mon, 19 Sep 2011 12:12:44 +0200
> > Subject: Re: [one-users] CONTEXT Issue with Vmware
> > To: bagai_bharat at hotmail.com
> > CC: users at lists.opennebula.org
>
> >
> > Dear Bharat,
> >
> > OpenNebula 2.2 doesn't have support for contextualization for VMware.
> > I suggest you upgrade to 3.0Beta2 and download the VMware 3.0Beta1
> > drivers.
> >
> > Regards,
> >
> > -Tino
> >
> > --
> > Constantino Vázquez Blanco | dsa-research.org/tinova
> > Virtualization Technology Engineer / Researcher
> > OpenNebula Toolkit | opennebula.org
> >
> >
> >
> > On Mon, Sep 19, 2011 at 9:00 AM, Bharat Bagai <bagai_bharat at hotmail.com>
> wrote:
> > > Hi All
> > >
> > >
> > >
> > > I have facing an issue while passing CONTEXT value to VM on ESXI thru
> > > OpenNebula.  My environment contains ESXI with VMWARE Hypervisor, Front
> End
> > > Machine & shared NFS folder on other machine that are connected to both
> > > machines. I am able to deploy machine with vmdk disk without passing
> context
> > > value. Now, I am trying to implement a scenario with iso file. I am
> using
> > > OPennebula 2.2 ( on RHEL) with ESXI 4.1
> > >
> > >
> > >
> > > The following are files
> > >
> > >
> > >
> > > ut.img
> > >
> > > -------------------------------------------------------
> > >
> > > NAME="ttyiso"
> > >
> > > DESCRIPTION="ttyiso i686 bits"
> > >
> > > PATH = "/srv/cloud/one/var/images/iso/ut-ttylinux-i686-12.6.iso"
> > >
> > > TYPE = OS
> > >
> > > -------------------------------------------------------
> > >
> > >
> > >
> > > ut.vm
> > >
> > > ----------------------------------------------------------------------
> > >
> > > NAME   = "ttyiso"
> > >
> > > VCPU    = 1
> > >
> > > MEMORY = 256
> > >
> > > OS = [ARCH = i686, BOOT = CDROM]
> > >
> > >
> > >
> > > DISK   = [ IMAGE  = "ttyiso"]
> > >
> > >
> > >
> > > #DISK = [ IMAGE = "Empty Datablock" ]
> > >
> > > DISK = [ TYPE   = fs,
> > >
> > >          SIZE   = 2048,
> > >
> > >          FORMAT = ext3,
> > >
> > >          SAVE   = yes,
> > >
> > >          TARGET = hda ]
> > >
> > >
> > >
> > > DISK = [ TYPE     = swap,
> > >
> > >          SIZE     = 512,
> > >
> > >          READONLY = "no" ]
> > >
> > >
> > >
> > > DISK = [ TYPE   = cdrom,
> > >
> > >         SOURCE =
> /srv/cloud/one/var/images/iso/ut-ttylinux-i686-12.6.iso,
> > >
> > >         READONLY = yes]
> > >
> > >
> > >
> > > NIC    = [ NETWORK_ID=0 ]
> > >
> > > REQUIREMENTS = "HYPERVISOR=\"vmware\""
> > >
> > > CONTEXT = [
> > >
> > > hostname = "$NAME-$VMID",
> > >
> > > ip_public = "$NIC[IP,NETWORK=\"eth0\"]",
> > >
> > > dns = "192.168.0.1"
> > >
> > > files = "/srv/cloud/one/.ssh/id_rsa.pub /srv/cloud/one/init.sh"
> > >
> > > ]
> > >
> > >
> -------------------------------------------------------------------------
> > >
> > >
> > >
> > > First I register this image thru onevmware command
> > >
> > > # oneimage register ut.img
> > >
> > > # onevm create ut.vm
> > >
> > >
> > >
> > > After creating VM, it starts deploying on last host & following are the
> > > logs. As cloning is done fine but gives error while deploying CONTEXT
> > >
> > >
> > >
> > >
> ----------------------------------------------------------------------------------------
> > >
> > > Mon Sep 19 10:54:36 2011 [TM][I]: tm_clone.sh: Executed "chmod a+rw
> > > /srv/cloud/one/var/imag
> > >
> > > es/33/images/disk.3".
> > >
> > > Mon Sep 19 10:54:36 2011 [TM][I]: COMMAND not found: CONTEXT
> > > /srv/cloud/one/var/33/context.
> > >
> > > sh host12:/srv/cloud/one/var/images/33/images/disk.4.
> > >
> > > Mon Sep 19 10:54:36 2011 [TM][E]: Error excuting image transfer script:
> > > COMMAND not found:
> > >
> > > CONTEXT /srv/cloud/one/var/33/context.sh
> > > host12:/srv/cloud/one/var/images/33/images/disk.4.
> > >
> > > Mon Sep 19 10:54:36 2011 [DiM][I]: New VM state is FAILED
> > >
> > > Mon Sep 19 10:54:36 2011 [TM][W]: Ignored: LOG - 33 tm_delete.sh:
> Deleting
> > > /srv/cloud/one/v
> > >
> > > ar/33/images
> > >
> > >
> > >
> > > Mon Sep 19 10:54:36 2011 [TM][W]: Ignored: LOG - 33 tm_delete.sh:
> Executed
> > > "rm -rf /srv/clo
> > >
> > > ud/one/var/33/images".
> > >
> > >
> > >
> > > Mon Sep 19 10:54:36 2011 [TM][W]: Ignored: TRANSFER SUCCESS 33 -
> > >
> > >
> ---------------------------------------------------------------------------------------------------
> > >
> > > The following are files ……
> > >
> > > bash-3.2$ ls -l /srv/cloud/one/var/32/
> > >
> > > total 16
> > >
> > > -rw-r--r-- 1 oneadmin cloud  109 Sep 19 10:46 context.sh
> > >
> > > -rw-r--r-- 1 oneadmin cloud   50 Sep 19 10:46 transfer.0.delete
> > >
> > > -rw-r--r-- 1 oneadmin cloud  505 Sep 19 10:46 transfer.0.prolog
> > >
> > > -rw-r--r-- 1 oneadmin cloud 2824 Sep 19 10:53 vm.log
> > >
> > >
> > >
> > > Thanks in advance
> > >
> > > _______________________________________________
> > > Users mailing list
> > > Users at lists.opennebula.org
> > > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> > >
> > >
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
network warrior
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20111017/41f95f8a/attachment-0003.htm>


More information about the Users mailing list