[one-users] opennebula: lease creation and usage
Carlos Martín Sánchez
cmartin at opennebula.org
Tue Mar 20 04:36:05 PDT 2012
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. [1]
- 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 [2].
- 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 [3].
Regards
[1] http://opennebula.org/documentation:rel3.2:vnet_template
[2]
http://opennebula.org/documentation:rel3.2:template_simple#network_section
[3] 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:
> Hello,
>
> 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,
> MODEL=virtio,
> MAC=02:00:0a:01:5b:02]
>
> 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
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120320/14498910/attachment-0002.htm>
More information about the Users
mailing list