[one-users] Contextualization

Jaime Melis jmelis at opennebula.org
Tue Apr 22 01:01:33 PDT 2014


Hi Christophe,

I would simply register the context package as a "Context" File in the
"Files & Kernels" datastores. Then update the template of the VM and select
that file in the Context -> Files tab. After instantiating the VM again,
you simply open or mount the cdrom (typically under /dev/sr0) and access
the context package there.

http://docs.opennebula.org/4.4/user/references/template.html#template-context
http://docs.opennebula.org/4.4/user/virtual_resource_management/img_guide.html#how-to-use-file-images-in-virtual-machines

BTW, at some point we want to provide a CD-ROM iso with all the context
packages inside of it, which would come in handy in this type of situations.

cheers,
Jaime


On Tue, Apr 22, 2014 at 9:00 AM, Christophe Duez <
christophe.duez at student.uantwerpen.be> wrote:

> Owkey I tried. but I can't get through the internet so I cant download the
> contextualization stuff.
> any other solutions?
> or solutions why it is that I can't connect through the internet?
>
>
> On Fri, Apr 18, 2014 at 1:50 PM, Duez Christophe <
> christophe.duez at student.uantwerpen.be> wrote:
>
>>  So what I have to do if I understand correctly:
>> Create a template in OpenNebula (pastbin template layout)<http://pastebin.com/cTBZ2wvL>
>>
>>   TEMPLATE 13 INFORMATION
>>> ID             : 13
>>> NAME           : empty install template
>>> USER           : oneadmin
>>> GROUP          : oneadmin
>>> REGISTER TIME  : 04/16 14:49:35
>>> PERMISSIONS
>>> OWNER          : um-
>>> GROUP          : ---
>>> OTHER          : ---
>>> TEMPLATE CONTENTS
>>> CONTEXT=[
>>>   NETWORK="YES",
>>>   SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]" ]
>>> CPU="1"
>>> DISK=[
>>>   IMAGE="CD Centos 6.5 Minimal",
>>>   IMAGE_UNAME="oneadmin" ]
>>> DISK=[
>>>   IMAGE="empty disc",
>>>   IMAGE_UNAME="oneadmin" ]
>>> GRAPHICS=[
>>>   KEYMAP="fr-be",
>>>   LISTEN="0.0.0.0",
>>>   TYPE="VNC" ]
>>> MEMORY="1024"
>>> NIC=[
>>>   IP="146.175.139.60" ]
>>> OS=[
>>>   ARCH="x86_64",
>>>   BOOT="cdrom" ]
>>
>>
>>  Start the VM with this template.
>> Install the OS
>> Open VNC
>>
>> vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0
>>
>>> TYPE=Ethernet
>>> ONBOOT=yes
>>> NM_CONTROLLED=no
>>> BOOTPROTO=static
>>> IPADDR=146.175.139.60
>>
>>  NETMASK=255.255.255.0
>>
>>
>>  Then install the contextualization.
>>
>>  shutdown the VM
>>
>>  Make the Image un-persistent
>>
>> Ready?
>>
>>
>> On Thu, Apr 17, 2014 at 11:53 PM, Anthony Francis - Handy Networks LLC <
>> anthony at handynetworks.com> wrote:
>>
>>>   The simplest way when you are creating a new template is to make one
>>> VM from the template while the image is persistent, manually assign the IP
>>> information to the VM via VNC, spice or what have you, then install all the
>>> base software including the contextualization package. Then clean up the
>>> logs etc, destroy the Vm, set the image back to no-persistant and your
>>> contextualization will work when you make new VM’s based on the image.
>>>   --
>>> Anthony Francis
>>>  Hosting Support Manager
>>> HandyNetworks LLC
>>> http://www.handynetworks.com/
>>> *303-414-6904 <303-414-6904>*
>>>
>>>   From: Christophe Duez <christophe.duez at student.uantwerpen.be>
>>> Date: Thursday, April 17, 2014 at 5:30 AM
>>> To: Valentin Bud <valentin.bud at gmail.com>
>>> Cc: opennebula <users at lists.opennebula.org>
>>> Subject: Re: [one-users] Contextualization
>>>
>>>   Hello,
>>> Thank you for the extensive responds
>>> This is what I did and where I got stuck:
>>>
>>>  Export the libvirt xml of the VM from the host,
>>>>
>>>>> virsh dumpxml one-45 > /tmp/XmlDumpFile
>>>>
>>>>
>>>
>>>> stop the VM,
>>>>
>>>>> virsh destroy one-45
>>>>>
>>>>
>>>> undefine the domain.
>>>>
>>>>> virsh undefine one-45
>>>>
>>>>
>>>
>>>> Configure the xml to mount a local folder from the host inside the VM
>>>> [1].
>>>>
>>>>> <filesystem type='mount' accessmode='passthrough'>
>>>>>       <driver type='path' wrpolicy='immediate'/>
>>>>>       <source dir='/tmp/contextualization'/>
>>>>>       <target dir='/tmp/contextualization'/>
>>>>>       <readonly/>
>>>>>     </filesystem>
>>>>
>>>>
>>>
>>>> Somehow deliver the context package in that folder.
>>>>
>>>>> mkdir /tmp/contextualization/
>>>>> yum install opennebula-context -y --downloadonly
>>>>> --downloaddir=/tmp/contextualization/
>>>>
>>>>
>>>
>>>  Define the domain using your crafted XML,
>>>>
>>>>> virsh define /tmp/XmlDumpFile
>>>>
>>>>
>>>> boot the machine,
>>>>
>>>>> ????
>>>>
>>>>
>>>
>>>  VNC to it,
>>>> mount the shared folder in the host and install the deb/rpm.
>>>
>>>
>>>  can you explain the boot parth of the whole process?
>>> and is this right what i did so far?
>>>
>>>
>>>
>>> On Thu, Apr 17, 2014 at 11:17 AM, Valentin Bud <valentin.bud at gmail.com>wrote:
>>>
>>>>  Hello Christophe,
>>>>
>>>>  Does your VM have a local network connection with the host or any
>>>> other
>>>> computer in your local network? If that's the case you can finish the
>>>> installation,
>>>> reboot, connect to the VM via SSH, scp the contextualization package
>>>> from
>>>> a local computer that is in the same network or has access to the
>>>> network the VM
>>>> is part of.
>>>>
>>>>  If you don't have VM network connectivity at all, the process I know
>>>> of is a little
>>>> bit tedious but doable.
>>>>
>>>>  Export the libvirt xml of the VM from the host, stop the VM, undefine
>>>> the domain.
>>>> Configure the xml to mount a local folder from the host inside the VM
>>>> [1]. Somehow
>>>> deliver the context package in that folder. Define the domain using
>>>> your crafted XML,
>>>> boot the machine, VNC to it, mount the shared folder in the host and
>>>> install the deb/rpm.
>>>>
>>>>  Are you somehow building a Debian image? If so try out bootstrap-vz,
>>>> a bootstraping
>>>> framework for Debian specifically targeted at bootstrapping systems for
>>>> virtualized
>>>> environments.
>>>>
>>>>  [1]: http://libvirt.org/formatdomain.html#elementsFilesystems
>>>>
>>>>  Best,
>>>> Valentin
>>>>
>>>>  On Thu, Apr 17, 2014 at 11:29 AM, Christophe Duez <
>>>> christophe.duez at student.uantwerpen.be> wrote:
>>>>
>>>>>  Hello,
>>>>> I followed this video from your youtube channel Bootstrapping
>>>>> OpenNebula 3.4 and creating a VM from scratch<https://www.youtube.com/watch?v=fQP4NQQ9NSI>.
>>>>> I did this with the OpenNebula 4.4.1.
>>>>> Almost at the end they say you have to follow the documentation to
>>>>> setup contextualization.
>>>>> I searched the documentation and found out there are 2 ways:
>>>>>
>>>>>
>>>>>>    - Install from our repositories package *one-context* in
>>>>>>    Ubuntu/Debian or *opennebula-context* in CentOS/RedHat.
>>>>>>    Instructions to add the repository at the installation guide<http://docs.opennebula.org/4.4/design_and_installation/building_your_cloud/ignc.html#ignc>
>>>>>>    .
>>>>>>    - Download and install the package for your distribution:
>>>>>>       - DEB<http://dev.opennebula.org/attachments/download/750/one-context_4.4.0.deb>:
>>>>>>       Compatible with Ubuntu 11.10 to 13.04 and Debian Squeeze
>>>>>>       - RPM<http://dev.opennebula.org/attachments/download/747/one-context_4.4.0.rpm>:
>>>>>>       Compatible with CentOS and RHEL 6.x
>>>>>>
>>>>>>
>>>>>   Now the problem that I have is the following...
>>>>> Without internet connection downloading the one-context package from
>>>>> the repository is impossible, right?
>>>>> And downloading the Package directly isn't possible either, is it not?
>>>>> So how do I enable/install the contextualization?
>>>>>
>>>>>  Please help me...
>>>>>
>>>>>  --
>>>>> Kind regards,
>>>>> Duez Christophe
>>>>>
>>>>>  _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opennebula.org
>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>>>
>>>>>
>>>>
>>>>
>>>>  --
>>>> Valentin Bud
>>>> http://databus.pro | valentin at databus.pro
>>>>
>>>
>>>
>>>
>>>  --
>>> Kind regards,
>>> Duez Christophe
>>> Student at University of Antwerp :
>>> Master of Industrial Sciences: Electronics-ICT
>>>
>>> E christophe.duez at student.uantwperen.be
>>> L linkedin duez-christophe<http://www.linkedin.com/pub/duez-christophe/74/7/39>
>>>
>>
>>
>>
>>  --
>> Kind regards,
>> Duez Christophe
>> Student at University of Antwerp :
>> Master of Industrial Sciences: Electronics-ICT
>>
>> E christophe.duez at student.uantwperen.be
>> L linkedin duez-christophe<http://www.linkedin.com/pub/duez-christophe/74/7/39>
>>
>
>
>
> --
> Kind regards,
> Duez Christophe
> Student at University of Antwerp :
> Master of Industrial Sciences: Electronics-ICT
>
> E christophe.duez at student.uantwperen.be
> L linkedin duez-christophe<http://www.linkedin.com/pub/duez-christophe/74/7/39>
>
> _______________________________________________
> Users mailing list
> Users at 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 | jmelis at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140422/d99ff68e/attachment-0002.htm>


More information about the Users mailing list