<div dir="ltr">Hi Steven<div><br></div><div>Sorry for the dealy. This is very interesting indeed. Usually we implement this feature the other way around, a hook registers the IP assigned by OpenNebula to the DHCP server. Obviously, this cannot be assumed in all deployments.</div>


<div><br></div><div>Thinking about this, I'd like to leverage the hook system. The goal is to manage the excution to an external driver and decouple it for the core it self. However, there are a couple of issues to address, as we need to synchronize IP and VM structures.</div>

<div><br></div><div>Could we somehow get around this by  implementin a API call to update the IP address?</div><div><br></div><div>Cheers</div><div><br></div><div>Rubén</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 3:24 PM, Steven Armstrong <span dir="ltr"><<a href="mailto:steven-opennebula@armstrong.cc" target="_blank">steven-opennebula@armstrong.cc</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
I hacked together a new type of virtual network which delegates the allocation of ip addresses to an external command [1].<br>
<br>
The use case is that we want to handle virtual machines exactly the same as physical ones.<br>
<br>
For physical hosts our bootstrap process looks something like this:<br>
- get a new machine, vendor gives us mac address<br>
- create dns/dhcp entries for the machine using an internal API<br>
- boot machine, install through dhcp/pxe<br>
- configure using cdist<br>
<br>
With the new vnet type, we can have the mostly same work flow for opennebula managed vms:<br>
- opennebula creates vm, generates mac address<br>
- the EXTERNAL network type runs a script that create dns/dhcp entries for the machine using an internal API<br>
- boot machine, install through dhcp/pxe<br>
- configure using cdist<br>
<br>
Together with the openvswitch backend and vlan tagging we have all we need to mix and match virtual and physical machines in all our subnets however we need to.<br>
<br>
If all this makes some sense to you it would be nice to get some feedback on [1].<br>
<br>
Please note that I am no C++ developer. I just copy/pasted try/error to get it to work ;-)<br>
<br>
Cheers,<br>
Steven<br>
<br>
[1] <a href="https://github.com/OpenNebula/one/pull/15" target="_blank">https://github.com/OpenNebula/<u></u>one/pull/15</a><br>
______________________________<u></u>_________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.opennebula.org" target="_blank">Dev@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/dev-opennebula.org" target="_blank">http://lists.opennebula.org/<u></u>listinfo.cgi/dev-opennebula.<u></u>org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><div>-- <br></div></div>Ruben S. Montero, PhD<br>Project co-Lead and Chief Architect<div>OpenNebula - Flexible Enterprise Cloud Made Simple<br>

<a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a> | @OpenNebula</div></div>
</div>