# Different vcenter\_refs for different hosts

**URL:** https://forum.opennebula.io/t/different-vcenter-refs-for-different-hosts/7831
**Category:** Installation & Configuration
**Created:** [November 14, 2019, 4:22pm UTC](https://forum.opennebula.io/t/different-vcenter-refs-for-different-hosts/7831 "2019-11-14T16:22:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![slnt\_opp](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/slnt_opp/32/6303_2.png) [@slnt\_opp](https://forum.opennebula.io/u/slnt_opp)
#### Post date: [November 14, 2019, 4:22pm UTC](https://forum.opennebula.io/t/different-vcenter-refs-for-different-hosts/7831/1 "2019-11-14T16:22:04Z")

</div>

Hi there,  
I’m not sure if it’s possible, but maybe it has something in common with super-vnets.  
The problem is, that we have one network and two hosts in vCenter and OpenNebula, but network has different refs in different hosts, let it be `dvportgroup-0` and `dvportgroup-1`.

So if vm should be deployed to host 0, `VCENTER_NET_REF` attribute should be dvportgroup-0 and vice versa. But `VCENTER_NET_REF` is already set in vnet or AR templates, and it’s not possible to change it basing on logical operators or dictionary.

So do anybody know any ‘fast’ solution with built-in functionality or should we develop a crutch like hook or smth?  
Thanks in advance for any of your help.

---

<div class="post-metadata">

### Author: ![slnt\_opp](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/slnt_opp/32/6303_2.png) [@slnt\_opp](https://forum.opennebula.io/u/slnt_opp)
#### Post date: [February 15, 2021, 11:44am UTC](https://forum.opennebula.io/t/different-vcenter-refs-for-different-hosts/7831/2 "2021-02-15T11:44:38Z")

</div>

Hello again. Last time this was fixed by setting NET\_REFS attribute to each AR, with the following value “cluster\_name,needed\_moref,cluster1\_name,needed\_moref1,etc”. But after upgrading to the latest ONe(5.12.0.3), it stopped working.  
So VM are getting networks attached from wrong switches, unless you “hardcode” each VCENTER\_NET\_REF to one cluster. But it breaks multi cluster functionality.

Any ideas there?

Thanks for your help!

P.S. vCenter Cluster == OpenNebula Host
