Add NIC without IP/MAC

Hello
I have a problem when adding NICs. In a specific server, I added several NICs but without any IP, because I will configure them latter. I had to create almost 80 Virtual Networks in OpenNebula, and also for simplicity, I didn’t specify a pool of IPs. I’m using the addon-lxcone, LXC allows me to add NICs to containers without IPs, but OpenNebula won’t let me instantiate a template that has any virtual network without an IP pool. The error will say "Error allocating a virtual machine. Cannot get IP/MAC lease from Virtual Network " Is there any way to bypass this validation?
Thanks

You can use ethernet address ranges:

http://docs.opennebula.org/4.14/user/virtual_resource_management/vgg.html#ethernet-address-range

Once you use ethernet ranges, as @jfontan recommended, lxcone will fail because it assumes you will use Virtual Networks with IP pools associated. Never thought about your specific situation but we are fixing this right now and we will update drivers on git most likely today. Download them and it will work.

Hello,

I have OpenNebula 5.4 and I have the same problem, my template is:

template: |
CONTEXT = [
CONTEXT = “true”,
HOSTNAME = “redhatAnsible”,
ETH0_GATEWAY = “192.168.1.1”,
ETH0_IP = “192.168.1.2”,
ETH0_MASK = “255.255.255.0”,
ETH0_NETWORK = “192.168.1.0”,
]
NIC=[
NETWORK = “VLAN 51”,
AR_ID = “1”
]

And in opennebula:

but I have the problem “Cannot get IP/MAC lease from virtual network 4”, it is not possible to use the nic field in the template having a mac without IP as a virtual network?

Thank you.

Hello,

I have solved the problem by updating ansible from 2.9 to 2.11 and updating collection community.general.

Thank you.