[one-users] opennebula: lease creation and usage
stephane at altern-it.com
Fri Mar 23 04:17:20 PDT 2012
Thanks for your answer.
I was wrong using LEASE instead of LEASES. I find it a little bit
confusing. I followed your advices and it is indeed much better.
Unfortunatly, I've noticed something that looks like a bug in lease
management: if I try to create a new vm with a template already used by
another running vm (with lease reservation), the vm is not created (as
expected), but the lease is freed (not expected).
Tell me what you're thinking about this.
Here's the way to reproduce:
-First, I create a vm from my template, with the following NIC
NIC = [ NETWORK_ID = 5,
When I do a "onevnet show 5", I see that lease associated with this IP is
-Then, I create another vm from the same template (for test purpose). As
expected, the vm is not created, because lease is already in use. At this
moment, if I do "onevnet show 5", the lease is not used anymore.
-Finally, because lease has been freed, I'm able to create another vm with
2012/3/20 Carlos Martín Sánchez <cmartin at opennebula.org>
> Hi Stéphane,
> I can see some problems with the templates you are pasting:
> - Your VNet template must use the LEASES attribute instead of LEASE, take
> a look at the examples in the doc. 
> - Inside VM/NIC, NETWORK_UID must be combined with the NETWORK attribute.
> If you want to provide the VNET ID, then you need to use the attribute
> NETWORK_ID .
> - In VM/NIC, the MAC must not be set manually if you are requesting a
> Lease from a VNet. It is also a restricted attribute, what means that your
> template will only work for oneadmin. Instead, request an specific Lease
> from your VNet using the IP attribute .
>  http://opennebula.org/documentation:rel3.2:vnet_template
>  http://opennebula.org/documentation:rel3.2:template#network_section
> Carlos Martín, MSc
> Project Engineer
> OpenNebula - The Open-source Solution for Data Center Virtualization
> www.OpenNebula.org | cmartin at opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
> On Mon, Mar 19, 2012 at 4:22 PM, Stéphane Bulot <stephane at altern-it.com>wrote:
>> I'm trying to create and use leases on virtual network. My issue is that
>> I'm not able to associate lease with virtual machines.
>> My virtual network template:
>> NAME = "MYNet"
>> TYPE = FIXED
>> BRIDGE = br191
>> LEASE =[ IP=X.X.X.2,MAC=02:00:0A:01:5B:02]
>> LEASE =[ IP=X.X.X.3,MAC=02:00:0A:01:5B:03]
>> LEASE =[ IP=X.X.X.4,MAC=02:00:0A:01:5B:04]
>> Virtual network creation seems to be ok, but If I do a "onevnet show ID
>> -x", I can see that my leases existing in virtual network template, but not
>> as a free lease.
>> Here is my vm template NIC section:
>> NIC = [ NETWORK_UID=4,
>> where NETWORK_UID is the network id defined above.
>> After starting VM, lease is still seen as a template.
>> As I manually create lease with onevnet addleases command, I'm able to
>> see lease as a free lease, but after starting VM, lease is still seen as
>> free lease.
>> Purpose of using lease is to prevent multiple vm started with same MAC/IP.
>> Did I miss something?
>> Thanks in advance
>> Stéphane Bulot
>> **44, avenue Dumotel
>> 94230 CACHAN
>> Tél: 01 83 62 06 87
>> Mob: 06 87 02 73 79
>> web: http://www.altern-it.fr <http://www.altern-it.com/>
>> e-mail: stephane at altern-it.com**
>> Users mailing list
>> Users at lists.opennebula.org
**44, avenue Dumotel
Tél: 01 83 62 06 87
Mob: 06 87 02 73 79
web: http://www.altern-it.fr <http://www.altern-it.com/>
e-mail: stephane at altern-it.com**
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users