[one-users] are variables inside the vm template possible?

Ruben S. Montero rubensm at dacya.ucm.es
Fri Feb 5 02:47:37 PST 2010


Hi,

As Javier said this is done in the OpenNebula core. We have filled one
ticket [1] to address this. However, looking at the attributes we do
not need to use this cross parsing for all the variables (e.g. OS,
DISK). Right now we have this for CONTEXT and for the REQUIREMENTS in
a development branch [2]. (For example you can do something like
REQUIREMENTS = $NIC[MAC] = MACS, if you have a custom probe that
generates a MACS attribute for the hosts you can do short of a MAC
pinning, so only VMs with a given MAC runs in a given host)

My proposal: default generation values for port and listen in
GRAPHICS. So if you do not put a port, OpenNebula will automatically
assign 5900+$VMID, and if you do not put a listen OpenNebula will
automatically HOSTNAME of the host where the VM is placed.

What do you think?


Cheers

Ruben

PS: Added this to the ticket [1] if you want to continue the discussion there

REFS:
[1] http://dev.opennebula.org/issues/189
[2] http://dev.opennebula.org/projects/opennebula/repository/show/branches/DEVELOPMENT/Context_Requirements

2010/2/5 Javier Fontan <jfontan at gmail.com>:
> Hello,
>
> Unfortunately it is not python script but it is parsed by OpenNebula
> itself. Only context part substitutes those parameters. The solution
> can come from letting kvm select the vnc port and modifying vmm driver
> to get vnc host/port in poll call (VM monitoring). I don't think that
> is too hard to do. Maybe we can add a ticket as a feature request.
>
> Bye
>
>
> 2010/2/5 Nikola Milutinović <n.milutinovic at levi9.com>:
>> On 2/5/2010 9:04 AM, Michael Fairchild wrote:
>>
>> Hello,
>>   I am wondering if there is any way to use variables inside the vm
>> definition, such as
>>
>> GRAPHICS = [
>>     type = "vnc",
>>     listen = "0.0.0.0",
>>     port = "590$VMID"
>> ]
>>
>> It should be. We are definitely using those for contextualization.
>>
>> CONTEXT = [
>>    ...
>>    id = $VMID,
>> ]
>>
>> That template is basically a Python script, if I understand correctly, so
>> you can even place a program inside.
>>
>> Nix.
>> --
>> Met vriendelijke groet / Kind regards,
>> Nikola Milutinovic
>> Sr Java Developer
>> Levi9 Global Sourcing
>> ________________________________
>> .  Jan van Goyenkade 8, 1075 HP Amsterdam, The Netherlands
>> (    +31 (0) 20 7547900 ext 2056
>> (    +381 (0) 21 4895800 ext 2056
>> È    +381 (0) 64 2202824
>> *    n.milutinovic at Levi9.com
>> ^    Skype: nikola.milutinovic
>> ü    www.levi9.com
>>
>> Chamber of commerce Levi9 Global Sourcing BV: 34221951
>> Chamber of commerce Levi9 Global Sourcing Benelux BV: 34224746
>> ________________________________
>> This e-mail may contain confidential or privileged information. If you are
>> not (one of) the intended recipient(s), please notify the sender immediately
>> by reply e-mail and delete this message and any attachments permanently
>> without retaining a copy. Any review, disclosure, copying, distribution or
>> taking any action in reliance on the contents of this e-mail by persons or
>> entities other than the intended recipient(s) is strictly prohibited and may
>> be unlawful.
>>
>> The services of Levi9 are exclusively subject to its general terms and
>> conditions. These general terms and conditions can be found on www.levi9.com
>> and a copy will be promptly submitted to you on your request and free of
>> charge.
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>
>
>
> --
> Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
> DSA Research Group: http://dsa-research.org
> Globus GridWay Metascheduler: http://www.GridWay.org
> OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Dr. Ruben Santiago Montero
Associate Professor, Complutense University of Madrid

URL:    http://dsa-research.org/doku.php?id=people:ruben
Weblog: http://blog.dsa-research.org/?author=7



More information about the Users mailing list