[one-users] Contextualization strategies and swap partition- Open Nebula 4.4 on Ubuntu 12.04

Ruben S. Montero rsmontero at opennebula.org
Sun Feb 9 11:51:51 PST 2014


On Thu, Feb 6, 2014 at 3:03 PM, Nelson Kotowski <nkotowski at gmail.com> wrote:

> Dear all,
>
>
>
> I have quite basic questions, but I couldn't manage to find an answer so
> far... Please, could you help?
>
>
>
> Just upgraded from OpenNebula 3.2 to 4.4, Ubuntu 12.04 based controllers
> and hosts, KVM-based. I create my images, for the future templates, using
> Virtual Machine Manager, based on Ubuntu official iso files.
>
>
>
> In OpenNebula 4.4 docs, there are three guidelines on setting up
> contextualization: basic, advanced and cloud-init usage.
>
>
>
> 1.       But... can one combine those strategies? For example, can I enable
> basic contextualization in order to benefit from network parameters and
> then use advanced contextualization (init script context file) in order to
> setup, for example, a NFS mount point?
>

Sure!. Please note that we are working on cloudinit for different OS. And
the support may vary from one distribution to other. But yes you could use
both


>
>
> 2.       In order to benefit from contextualization variables, is it a
> pre-requisite that one installs one-context package to use each of the
> contextualization strategies or only for a specific scenario (basic,
> advanced or cloud-init)?
>

The variables are set and the context block device is prepared by oned if
defined. the one-context package will help you to deal with it,but you can
always mount the CD directly and source the variables


>
>
> 3.       Suppose I want to use only the information on basic
> contextualizion (DEV_IP, DEV_DNS, etc...) to setup, for instance, virtual
> machine instance IP, gateway, DNS... What should be the correct steps? Should
> I...
>
>
>
> a.       Install the one-context package before anything?
>
> b.      Forget about one-context package and only enable network
> contextualization in the template and that´s done; or use both the
> one-context package and enable the network contextualization in the
> template?
>
> c.       Do the above and also use a init script context file, using the
> DEV_IP, DEV_DNS, etc... variables?
>


I think you are describing an incremental process:

1.- [OFF GUEST] You need to define CONTEXT and if you are interested the
network contextualization variable set. When OpenNebula see a VM with a
CONTEXT section, it creates a special CD, transfer it to the hypervisor and
attaches it to the VM at boot time.

2.- [ON GUEST] Guest is booting it can access the CD, and source a
context.sh file to get the variables (note no network needed). The CD can
have other files (e.g. a chef receipt)

3.- [ON GUEST] You need to fire the CD mounting procedure and logic
processing the context. You can do this manually or by installing
one-context (or cloud-init to some extent)


>
>
> 4.       In this sense, are the one-context scripts (00-network,
> vmcontext, etc...) used only with advanced contextualization, or also with
> the basic one?
>

Both


>
>
> 5.       At last, about the swap partition... I have an image with a swap
> partition defined, tried to use it in a template, but I am facing several
> boot hangups associated to swap file creation (it did not happen in
> OpenNebula 3.2). I read in the docs (
> http://docs.opennebula.org/stable/user/virtual_machine_setup/bcont.html)
> that "...The contextualization package will also mount any partition labeled
> swap as swap..." . Does that mean we should at first create an image
> without swap and then setup in OpenNebula template configuration, which
> will use this image, a volatile disk, swap type? Is that the
> correct/suggested way to work?
>

Yes. There is no benefit from storing swap in a datastore, note also that
you need to move it around. So we usually define a volatile swap disk,
created on the target hypervisor. Usually this does not interfere with the
disk layout of the VM, but it may depends.


>
>
> I really appreciate both your help and OpenNebula, I feel just a bit
> confused on those contextualization strategies and swap issues...
>

Come back if you have more doubts or something it is not clear.

Thanks

Ruben


>
>
> Best regards,
>
> Nelson Peixoto Kotowski Filho
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140209/5970f154/attachment-0002.htm>


More information about the Users mailing list