We are creating networks through the API but we can’t find which parameter we must pass to have VLAN_ID_AUTOMATIC=1. This parameter is not explained in the documentation, only that:

The VLAN id will be the same for every interface in a given network, calculated automatically by OpenNebula. It may also be forced by specifying an VLAN_ID parameter in the Virtual Network template.

BRIDGE = "nebula"

This results in:


I tested on 5.0.2 and 5.2.1, it looks like a bug, can you confirm before I open one?


Hi there!
I haven’t tried with the Openvswitch driver but with a 802.1Q network if you want OpenNebula to generate a VLAN_ID automatically, I’d try to add AUTOMATIC_VLAN_ID=“YES” to your virtual network template. If you want to use 1 as the VLAN_ID I would pass VLAN_ID=1 to the API while AUTOMATIC_VLAN_ID would not used in this case.

If that works I’ll create a PR to add that info to the Openvswitch doc section.


Interesting, the final attribute is <VLAN_ID_AUTOMATIC>1</VLAN_ID_AUTOMATIC>, the names do not match.

Thanks a lot, I’ll open a bug for the documentation.

Unfortunately this is not usable to “fix” already wrongly defined networks.

I tried to add AUTOMATIC_VLAN_ID="YES" with onevnet update and it does not works :-/


I finally opened the bug #4989, I’ll let the developers decide if it should go in Documentation instead of Drivers - Network, because the documentation looks clear:

  • Attribute: VLAN_ID
  • Value: The VLAN ID, will be generated if not defined
  • Mandatory: NO