I am working on OpenNebula + vCenter network. It is seems Automatic VLAN ID not work for vCenter Port Group (In oned.conf, VLAN_IDS is for 802.1Q and Open vSwitch driver. However, AUTOMATIC_VLAN_ID should support vcenter driver)
Versions of the related components and OS (frontend, hypervisors, VMs):
If I create network with specific VLAN ID, it works. That means no problem for template[“VLAN_ID”] .
If I select Automatic VLAN I, the output will be 0 (no VLAN ID). I believe vlan_id is set to 0 instead of template[“AUTOMATIC_VLAN_ID”].
I had edit the hook as below but it will result into error:
vlan_id = template[“AUTOMATIC_VLAN_ID”]
VCENTER_NET_ERROR : A port group with name TestPG could not be created. Reason: InvalidRequest: Required property vlanId is missing from data object of type HostPortGroupSpec while parsing serialized DataObject of type vim.host.PortGroup.Specification at line 1, column 265 while parsing call information for method AddPortGroup at line 1, column 177 while parsing SOAP body at line 1, column 167 while parsing SOAP envelope at line 1, column 0 while parsing HTTP request for method addPortGroup on object of type vim.host.NetworkSystem at line 1, column 0
It is seems have problem on template[“AUTOMATIC_VLAN_ID”] .
digging into the code it seems that this functionality is broken.
Sorry about that im going to check this and we will have fixed the vcenter automatic_vlan_id for the next release.