<div dir="ltr">Hi Steven,<div><br></div><div>Again, I've got sidetracked by other (less interesting) things... Anyway, I want to clear this to have something for 4.6. </div><div><br></div><div>You are right IPs, are not used by ONE core. The IP's assgined by OpenNebula are used only to pass a meaningful value to the VM through context.</div>

<div><br></div><div>We could decouple this, as in #2545. However, you need to know the MAC addresses before hand or set them in the vnets. In the current setup we could:</div><div>  1.- DHCP is configured with a given map (MAC-IP)<br>

</div><div>  2.- Define a network of type fixed. Each lease is a mac address and ip address, those defined in the DHCP map.</div><div>  3.- Add the the required A register in DNS server for the IP</div><div><br></div><div>

Note that Option 2 will  work with opennebula 4.x. Also note that 2 can be easily auotmated using the cli or the API. Is that acceptable for your use case? </div><div><br></div><div><br></div><div>Cheers</div><div><br></div>

<div>#2545 - <a href="http://dev.opennebula.org/issues/2545">http://dev.opennebula.org/issues/2545</a><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 19, 2013 at 4:01 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">Ruben S. Montero wrote on 12/19/2013 03:34 PM:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Steven<br>
<br>
</blockquote>
<br>
Hi Rubén<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry for the dealy. This is very interesting indeed. Usually we implement<br>
this feature the other way around, a hook registers the IP assigned by<br>
OpenNebula to the DHCP server. Obviously, this cannot be assumed in all<br>
deployments.<br>
</blockquote>
<br></div>
My problem with this is that the networks are shared with physical machines. So I can't let OpenNebula manage them. I could preallocate a number of IPs in each subnet for virtual machines but that feels like a hack.<br>


<br>
So I thought I could either add a lease and somehow reserve it for a specific vm, preferably by mac address. But this does not seem to be possible.<br>
<br>
So I came up with the idea of EXTERNAL leases.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thinking about this, I'd like to leverage the hook system. The goal is to<br>
manage the excution to an external driver and decouple it for the core it<br>
self. However, there are a couple of issues to address, as we need to<br>
synchronize IP and VM structures.<br>
</blockquote>
<br></div>
Happy with that if it gives me what I need ;-)<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Could we somehow get around this by  implementin a API call to update the<br>
IP address?<br>
</blockquote>
<br></div>
Possible, but in the mean time I found this [1] which I think could also solve my problems. Together with some new hooks it could handle all use cases I can think of. [2] is maybe related.<br>
<br>
For me it would be best if OpenNebula would not care about IP addresses at all. From my limited understanding (noob alert here) the vms IP's are not used by OpenNebula directly anyway. Is this correct?<br>
<br>
What I do when we get a new physical machine is:<br>
- get mac from hardware or supplier<br>
- define ip to mac binding via dhcp<br>
- define hostname to ip binding via dns<br>
<br>
I'd like to treat vms exactly the same. Only difference that OpenNebula gives me the mac address instead of my hardware supplier.<br>
<br>
Cheers,<br>
Steven<br>
<br>
[1] <a href="http://dev.opennebula.org/issues/2545" target="_blank">http://dev.opennebula.org/<u></u>issues/2545</a><br>
[2] <a href="http://dev.opennebula.org/issues/1958" target="_blank">http://dev.opennebula.org/<u></u>issues/1958</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>