[one-users] RES: Virtual Machine contextualization variables

Olivier Sallou olivier.sallou at irisa.fr
Tue Sep 17 00:16:19 PDT 2013


On 09/13/2013 07:46 PM, Nelson Peixoto wrote:
> Hi Olivier,
>
> Thanks for the reply. Anyway... about those variables, is there such a thing
> as a reference guide for them? 

http://opennebula.org/documentation:rel4.2:cong

you can define your own variables in the template:

myvar = "something"

or use existing variables from network and image template with keywords
from each template.
> I see there are several ways to use a
> variable inside a VM template but it is not clear which are them and what
> values can be applied onto them.
>
> The question about the hosts is mainly because so far I could not manage to
> understand the interaction in between OpenNebula virtual networks and each
> KVM installation in the hosts, and how to deal with the routes so that each
> VM can "see" each other.
>
> Right now, I have two hosts for the VM's, both of them with a KVM
> installation. By default, KVM sets up a virbr0 interface with 192.168.122.1
> network address. 
>
> I wanted to be able to create a single ranged virtual newtork (with a lease
> pool), which could be used by both of the hosts when instantiating a VM, so
> that I could have more than 255 IP addresses for VM's at a time.
host with a bridge will virtualize the VM networks. Nothing special to do.
Each VM will have its own IP from the network you defined help with the
context (for example with

ip_private = "$NIC[IP, NETWORK=\"public net\"]",

and the open-nebula context package) or with a DHCP server if you have one.

In opennebula you create a network with an IP range. When you launch a
VM, it will pick up a free IP from the range and setup the NIC[IP]
context variable. However openebula does not provide a DHCP. To setup
the IP on the VM, it is done either with the boot context scripts,
either with an external DHCP server that match the range of MAC address
defined in your network.

>
> I need to have, for example, 400 VMs instantiated using a single ranged
> virtual network, supported by these two hosts. Is it possible? If so, how
> should I proceed? Or if not, does that mean I will have to create several
> virtual networks, each one limited to x.x.x.1-x.x.x.255 VM's at a time, and
> then create several templates for each different virtual networks?
I think you can define a range IP network with a mask of class B (
http://opennebula.org/documentation:rel4.2:vnet_template)
>
> I do not know if I am being clear in the explanation... thanks for the
> comprehension...
>
> Best regards,
> Nelson Peixoto.
>
> I later created a virtual network in OpenNebula, ranged type, 192.168.
> -----Mensagem original-----
> De: Olivier Sallou [mailto:olivier.sallou at irisa.fr] 
> Enviada em: sexta-feira, 13 de setembro de 2013 11:27
> Para: nelsonpeixoto at fiocruz.br
> Cc: users at lists.opennebula.org
> Assunto: Re: [one-users] Virtual Machine contextualization variables
>
>
> On 09/12/2013 05:36 PM, nelsonpeixoto at fiocruz.br wrote:
>> Dear friends,
>>
>> It is my first post in here. I have been trying out OpenNebula 3.2 and 
>> I have a doubt on using context variables.
>>
>> I have two hosts for the VMs and i want to be able to capture, via 
>> context variable, for each VM I instantiate, which host is it on (IP or
> FQDN).
>> I managed to find this page
>> (http://opennebula.org/documentation:archives:rel3.2:template) with a 
>> set of instructions on how to use context variables and a link to some 
>> of the possible values, but I could not find any hint on how to catch 
>> any information on which host is the VM running on.
>>
>> I want to be able to capture this information and later on use this 
>> data on the VM boot, in order to add some specific network configurations.
>>
>> So, is there a place with a broader context variable reference guide 
>> or is there a way to catch that info?
> Hi,
> you can't set (yet)  any dynamic context variable. All you can do is to set
> some "static" variables in the template of your VM.
> Via Hooks, you may be able to catch the information (getting all context
> data of the VM), and register it in a db/file/... then your VM, once booted,
> could try to access this data.
> However, your VM network should not depend on the host running the VM.
>
> Regards
>
> Olivier
>> Thanks in advance,
>> Nelson Peixoto.
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
> --
> Olivier Sallou
> IRISA / University of Rennes 1
> Campus de Beaulieu, 35000 RENNES - FRANCE
> Tel: 02.99.84.71.95
>
> gpg key id: 4096R/326D8438  (keyring.debian.org) Key fingerprint = 5FB4 6F83
> D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>
>

-- 
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95

gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130917/a0eef1b1/attachment-0002.htm>


More information about the Users mailing list