Thank you Nicolas,
for the OCCI it will be good, but for the console and sunstone I think I will have to wait....

Cheers,

;)riol

On 02/19/2013 10:13 AM, Nicolas AGIUS wrote:
Hi,

I've done somethings like this with OCCI.
I put all the IP stuff in the network template and added the following in "common.erb" :

CONTEXT=[
  TARGET=xvdb

    <% devnum = 0 %>
    <% @vm_info.each('NIC') do |nic| %>
        <% if nic.attr('NETWORK','href') %>
,CTX_ETH<%= devnum %> = "$NETWORK[TEMPLATE, NETWORK_ID = <%= nic.attr('NETWORK','href').split('/').last %> ]"
            <% devnum += 1 %>
        <% end %>
    <% end %>
]


And I get all networks templates in the context file.

Cheers,
Nicolas AGIUS

--- En date de : *Lun 18.2.13, Oriol Martí /<oma...@cesca.cat>/* a écrit :


    De: Oriol Martí <oma...@cesca.cat>
    Objet: [one-users] Add network context variables automatically
    À: "Users OpenNebula" <users@lists.opennebula.org>
    Date: Lundi 18 février 2013, 15h20

    Hello,
    after looking the mechanism of the contextualization variables to
    set the network configuration, my idea is to pass the network
    parameters with contextualization, my idea is to add to the
    context variables the IP, netmask, DNS,... of the related NICs.

    I've been thinking to add a hook on create a VM, but I don't know
    if I can modify the context variables at this point, does anybody
    know if is possible?
    Maybe another solution could be launching the hook on the physical
    node and modifying directly the cdrom image that opennebula
    creates, but I'm not sure if this procedure it will be good
    because maybe the cdrom image is not created when the hook is
    launched and can fail easily.

    Does anybody know if is possible to do? Maybe the only solution is
    modifying source code? Where can I start?

    Thank you all,
    _______________________________________________
    Users mailing list
    Users@lists.opennebula.org </mc/compose?to=Users@lists.opennebula.org>
    http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to