# Dynamically create portgroups

**URL:** <https://forum.opennebula.io/t/dynamically-create-portgroups/4802>\
**Category:** Product Support\
**Created:** [August 23, 2017, 12:10pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802 "2017-08-23T12:10:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [August 23, 2017, 12:10pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/1 "2017-08-23T12:10:55Z")

</div>

As I’m new to OpenNebula I just wanted to ask a quick question. Is it possible, and if so how, to have a “pool” of vlan ID’s published to OpenNebula and have adminusers in OpenNebula create networks themselves which get’s provisioned as a portgroup in VMware? I would like to prepopulate a bunch of vlans to ESX clusters, then have other personnel to be able to create networks and VM’s on those networks.

---

<div class="post-metadata">

**Author:** ![tinova](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/tinova/32/25_2.png) [@tinova](https://forum.opennebula.io/u/tinova)\
**Post date:** [August 23, 2017, 1:09pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/2 "2017-08-23T13:09:48Z")

</div>

Yes, this is supported, please refer to the documentation:

[http://docs.opennebula.org/5.4/deployment/vmware\_infrastructure\_setup/networking\_setup.html](http://docs.opennebula.org/5.4/deployment/vmware_infrastructure_setup/networking_setup.html)

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [August 23, 2017, 1:45pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/3 "2017-08-23T13:45:34Z")

</div>

Great. Thanks. I got it to work except it didn’t add a auto-vlan ID on the network. But maybe I’ve missed some setting in the oned.conf? I’ll investigate further.

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [August 25, 2017, 9:12am UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/4 "2017-08-25T09:12:39Z")

</div>

Is this a bug? I’m creating vcenter port groups from the GUI using these settings and Auto vlan… It creates the protgroup OK but it’s missing the vlan ID?

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/7/78e08a815d51e7a733be4062476ff6d7bd437756.png)

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [August 28, 2017, 2:03pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/5 "2017-08-28T14:03:26Z")

</div>

Noone else that has this problem?

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [August 31, 2017, 5:29am UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/6 "2017-08-31T05:29:57Z")

</div>

After the network is created, shouldn’t the vlan ID field be populated? Is there somewhere I can find what $template contains when the hook runs ?  
If I set manual vland id it works.

---

<div class="post-metadata">

**Author:** ![Semedi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/semedi/32/5365_2.png) [@Semedi](https://forum.opennebula.io/u/Semedi)\
**Post date:** [September 28, 2017, 1:58pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/7 "2017-09-28T13:58:25Z")

</div>

Hi,

Sorry but it seems that automatic\_vlan\_id does not work properly for vcenter\_driver.

We’ll have fix this as soon as possible.

Thanks.

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [September 28, 2017, 6:46pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/8 "2017-09-28T18:46:49Z")

</div>

Ok , great! Thanks

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [September 29, 2017, 7:04am UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/9 "2017-09-29T07:04:19Z")

</div>

Any time scheduled for that fix, just so I know when I can expect it ?

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [October 16, 2017, 11:33pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/10 "2017-10-16T23:33:37Z")

</div>

Some progress on this fix?

---

<div class="post-metadata">

**Author:** ![Semedi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/semedi/32/5365_2.png) [@Semedi](https://forum.opennebula.io/u/Semedi)\
**Post date:** [October 17, 2017, 8:41am UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/11 "2017-10-17T08:41:37Z")

</div>

Hi,

sorry about the delay i didn’t notice about this topic 😅.

Automatic VLAN\_ID it has been already fixed, you can look at development repo to find it, so it expected that it will work for the next release.  
Anyways you can view the fix here: [https://github.com/OpenNebula/one/commit/139f448a76a03a0fd9fbfe8ddc6b8457205f774d](https://github.com/OpenNebula/one/commit/139f448a76a03a0fd9fbfe8ddc6b8457205f774d)

Cheers.

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [October 17, 2017, 9:36am UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/12 "2017-10-17T09:36:48Z")

</div>

🙂 great. How do I apply the fix?

Kind regards

![](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/f/fe2a0dcab136e19c7b0613a8d0b5579322bea120.jpg)

![](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/f/febcead18d5c65b1156fd6c122c36323521adad5.jpg)

---

<div class="post-metadata">

**Author:** ![Semedi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/semedi/32/5365_2.png) [@Semedi](https://forum.opennebula.io/u/Semedi)\
**Post date:** [October 17, 2017, 3:52pm UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/13 "2017-10-17T15:52:18Z")

</div>

Im afraid that this fix implies core changes so you need to compile the core yourself.

Here is the guide to do it: [http://docs.opennebula.org/5.4/integration/references/compile.html?highlight=source%20code](http://docs.opennebula.org/5.4/integration/references/compile.html?highlight=source%20code)

---

<div class="post-metadata">

**Author:** ![NiclasEriksson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NiclasEriksson](https://forum.opennebula.io/u/NiclasEriksson)\
**Post date:** [October 18, 2017, 6:40am UTC](https://forum.opennebula.io/t/dynamically-create-portgroups/4802/14 "2017-10-18T06:40:39Z")

</div>

Ok, do you know when the next official version is about to be released?

Kind regards

![](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/f/fe2a0dcab136e19c7b0613a8d0b5579322bea120.jpg)

![](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/f/febcead18d5c65b1156fd6c122c36323521adad5.jpg)
