Network issue when importing Wilds from vCenter

I have a somewhat strange problem importing Wilds from my vCenter.
When I import a VM from vCenter 7 into my OpenNebula 6, it works fine. But now when I try to import a second VM which is connected to the same network as the previously imported VM, I get the message: “Cannot get IP/MAC lease from virtual network”.
When importing the 1st VM, OpenNebula creates a virtual network. In the addresses I see the IP and MAC of the failed VM, but the VM itself is missing.

My network configuration:
BRIDGE = “TEST+VLAN_111”
BRIDGE_TYPE = “vcenter_port_groups”
OUTER_VLAN_ID = “”
PHYDEV = “”
SECURITY_GROUPS = “0”
VCENTER_FROM_WILD = “”
VCENTER_IMPORTED = “YES”
VCENTER_NET_REF = “dvportgroup-6385”
VCENTER_ONE_HOST_ID = “0”
VCENTER_PORTGROUP_TYPE = “Port Group”
VCENTER_SWITCH_NAME = “dvsLAB”
VCENTER_TEMPLATE_REF = “vm-6538”
VLAN_ID = “”
VN_MAD = “vcenter”

For testing, I downloaded the OVA v6 and imported it in to my vmware environment. When importing the second VM I get exactly the same error message as with the installed version.

Can you send us the output of “onevnet show -x” of the Virtual Network created?

Hi tinova
Here is the output from “onevnet show -x”
output.txt (3.0 KB)

I have exactly this same issue. New CE 6.0.2 install, so it’s all fresh, and I tried to add my wilds.

The first few imports created the virtual networks and I got a few wild VMs on each of those networks to import. When I try and do the rest I get “Cannot get IP/MAC lease from virtual network”.

Damm even I am having a similar kind of issue, I have searched all over the internet and even have posted on number of threads on different forum, no solution seems to work. I am really frustrated, can anyone of you here help me resolve this issue, I am very much tired now.

any update on my issue ? . .

Hi @Shubhampaul ,

Can you share the output of onevnet show -x <VNET_ID>. If you have VMs succesfully attached to that virtual net, can you share the output of onevm shox -x <VM_ID>.

Cheers.

Hello everybody. Thank you for reporting this bug.
We have identified a bug that was related to IPv6 when it came from vCenter in a different order.
Before it did not happen because new ARs were always created for each IP but in 6.0 we have made several improvements to avoid repeated data, in the next release it will be fixed.

This is the issue on GitHub

Hi,

i’ve the same issue but my vcenter ist in 6.7.

I’ve test the fix of carlos but when i try to import my virtual machine, i encountered the same issue…

I’m in 6.0.2 Opennebula :slight_smile:

Regards,

hi,

Anybody have try the fix of carlos ?

Regards,

This fix works for me.

Though it’s rejecting wilds that have snapshots. Might be my imagination, but I don’t remember it doing that with previous releases.

Hi @cherrera , i do the modification on the file [src/vmm_mad/remotes/lib/vcenter_driver/vm_template.rb] but the issue is still present, are you sure that you need to made just this modification ?

all of the wild machine with ipv6 cannot be imported on opennebula :frowning:

Kind regard

nobody can help me ?

CPU = “4”
vCPU = “4”
MEMORY = “32768”
HYPERVISOR = “vcenter”
CONTEXT = [
NETWORK = “YES”,
SSH_PUBLIC_KEY = “$USER[SSH_PUBLIC_KEY]”
]
VCENTER_INSTANCE_ID =“28d127c3-abed-4032-93af-d933a79a9ae3”
VCENTER_CCR_REF =“domain-c41”
DEPLOY_ID =“vm-2167”
IMPORT_STATE =“a”
VCENTER_DS_REF = “datastore-25633”
GRAPHICS = [
TYPE =“vnc”,
PORT =“6457”,
KEYMAP =“fr”,
LISTEN =“0.0.0.0”
]
DESCRIPTION = "vCenter Template
imported by OpenNebula from Cluster "
LOGO=images/logos/windows8.png
DISK=[
IMAGE_ID=“171”,
OPENNEBULA_MANAGED=“NO”
]
NIC=[
NETWORK_ID=“18”,
NAME =“VC_NIC0”,
IP6=“fe80::9542:e34b:bc82:791f”,OPENNEBULA_MANAGED=“NO”
]
NIC=[
NETWORK_ID=“19”,
NAME =“VC_NIC1”,
IP6=“fe80::74c8:1626:f6aa:ab5f”,OPENNEBULA_MANAGED=“NO”
]
VCENTER_ESX_HOST = test-esx-13.test.esx
", false
Wed Sep 1 17:45:23 2021 [Z0][ONE][E]: Cannot get IP/MAC lease from virtual network 18.
Wed Sep 1 17:45:23 2021 [Z0][ReM][E]: Req:7184 UID:0 one.vm.allocate result FAILURE [one.vm.allocate] Cannot get IP/MAC lease from virtual network 18.

:frowning:

hi,

I’ve change the password of oneadmin and i restart the service of OpenNebula and the issue seems to be resolve.

Kind regards,