How to merge imported networks from vcenter

Hi, importing resources from a vcenter instance I get many virtual networks (bridge mode). They’re named like:

mynetwork [VM test-vm]
mynetwork [VM lab01]
mynetwork [VM sqlserver]

What would be the best approach to merge all the intances on a single “mynetwork” having already running VMs?, I don’t want to purge everything and recreate them with ONE.

Hello,
You create new network for every new VM in vCenter?

Do these VMs have NICs attached to the same port-group? or different?

Please paste the output of "onevnet show " for each of the created networks. OpenNebula should detect this scenario and reuse already created virtual networks.

I’ve created only two networks with ONE, there’s only one instance no matter how many VMs. The multiple instances where created after “import from vcenter” operation:

ID      USER            GROUP           NAME                             CLUSTERS        BRIDGE  LEASES
0       oneadmin        oneadmin        VM Network [VM tools03]          "0      100"    VM Network      1
1       oneadmin        oneadmin        VM Network [VM wks-lnx01]        "0      100"    VM Network      1
2       oneadmin        oneadmin        VM Network [VM wks-win10-b]      "0      100"    VM Network      1
3       oneadmin        oneadmin        VM Network [VM windows-7-x86_64]        "0      100"    VM Network      1
4       oneadmin        oneadmin        VM Network [VM windows-10-x86_64]       "0      100"    VM Network      1
5       oneadmin        oneadmin        VM Network [VM sqls-lnx02]      "0      100"    VM Network      1
6       oneadmin        oneadmin        VM Network [VM kopano01]        "0      100"    VM Network      1
7       oneadmin        oneadmin        VM Network [VM cstack01]        "0      100"    VM Network      1
8       oneadmin        oneadmin        VM Network [VM kopano02]        "0      100"    VM Network      1
9       oneadmin        oneadmin        VM Network [VM sqls-lnx01]      "0      100"    VM Network      1
10      oneadmin        oneadmin        VM Network [VM gslb01]          "0      100"    VM Network      1
11      oneadmin        oneadmin        VM Network [VM dc02]            "0      100"    VM Network      1
12      oneadmin        oneadmin        VM Network [VM ensp]            "0      100"    VM Network      1
13      oneadmin        oneadmin        VM Network [VM sgbd-pg01]       "0      100"    VM Network      1
14      oneadmin        oneadmin        VM Network [VM ovs01]           "0      100"    VM Network      1
16      oneadmin        oneadmin        VM Network [VM tools02]         "0      100"    VM Network      1
17      oneadmin        oneadmin        VM Network [VM nas02]           "0      100"    VM Network      1
18      oneadmin        oneadmin        VM Network [VM cstack02]        "0      100"    VM Network      1
19      oneadmin        oneadmin        internal [VM nas02]             "0      100"    internal        1
20      oneadmin        oneadmin        VM Network [VM client01]        "0      100"    VM Network      1
21      oneadmin        oneadmin        VM Network [VM ons]             "0      100"    VM Network      1
22      oneadmin        oneadmin        VM Network [VM sdnc01]          "0      100"    VM Network      1
23      oneadmin        oneadmin        VM Network [VM dc01]            "0      100"    VM Network      1
24      oneadmin        oneadmin        VM Network [VM cartodb01]       "0      100"    VM Network      1
25      oneadmin        oneadmin        benja [VM benja-lnx01]          "0      100"    benja   1
26      oneadmin        oneadmin        VM Network [VM windows-8-x86_64]        "0      100"    VM Network      1
27      oneadmin        oneadmin        VM Network [VM zm01]            "0      100"    VM Network      1
28      oneadmin        oneadmin        VM Network [VM gslb02]  "0      100"    VM Network      1
29      oneadmin        oneadmin        VM Network - clu-home [vcsa.lan - Dpto]_119ed073ed37    "0      100"    VM Network      0
30      oneadmin        oneadmin        benja - clu-home [vcsa.lan - Dpto]_d332b9ba7535 "0      100"    benja   0
31      oneadmin        oneadmin        internal - clu-home [vcsa.lan - Dpto]_f238b42daaf4      "0      100"    internal        0
33      oneadmin        oneadmin        test    100     test    2
34      oneadmin        oneadmin        gtpy    100     gtpy    2

The requested detail can be found here:

https://pastebin.com/2gMGVPbH

We opened a ticket to further look into this for the next maintenance release:

https://dev.opennebula.org/issues/5286

We will be reaching back if we need more information.

Thank you for the detailed feedback.

I have exactly the same scenario. Imported VM’s each end up on their own new network instead of the actual network which they are on.

This issue is fixed in the master branch of GitHub, and will be present in the upcoming OpenNebula releases. We’d appreciate if you could test the development version (the fix is present in branch “one-5.4”, I advise using that branch) to let us know of possible problems:

https://dev.opennebula.org/issues/5286

Hi Tino, we are using 5.2 release from apt repo - Are there any instructions on how to test the new fix?

I’d suggest building OpenNebula from scratch on a separate box, using the tip of one-5.4 branch:

https://github.com/OpenNebula/one/tree/one-5.4

You can find instructions on how to build opennebula here:

http://docs.opennebula.org/5.4/integration/references/compile.html