Unable to create network with long broadcastUri in vSwitch
ISSUE TYPE
- Bug Report
COMPONENT NAME
VMware integration
CLOUDSTACK VERSION
4.19 and before
SUMMARY
When the broadcastUri is too long, it is being refused at vCenter for violating max length of 80 chars.
A specified parameter was not correct: spec.name The name value : cloud.guest.3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020.3000.1-dvS-ext in spec.name is too long. Maximum length cannot exceed 80 characters.
It's possible to workaround this on dvSwitch with the following syntax vlan://3001-3020, but not on normal vSwitch.
STEPS TO REPRODUCE
Create a shared network with long broadcastUri
Deploy a VM in the network
EXPECTED RESULTS
Network implemented at vCenter
ACTUAL RESULTS
Error for max length exceeded.
@borisstoyanov did you mean 4.19 and after?
It seems, for vSwitch and dvSwitch port groups in VMware, only VLAN ID between 0 and 4095 is accepted, not the range or multiple comma-separated VLANs. For dvSwitch port groups, VLAN range is accepted through VLAN trunking.
VLANs range check in vSwitch port group:
VLANs comma-separated check in vSwitch port group:
VLANs range check in dvSwitch port group:
VLANs range check using trunking in dvSwitch port group:
VLANs comma-separated check using trunking in dvSwitch port group:
CloudStack supports dvSwitch with VLAN trunking, it is recommended to specify the vlan range wherever possible along with the vlan:// scheme prefix.
https://github.com/apache/cloudstack/blob/c9f1c5790d131b744fb16cc417c7f9540d7c604d/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java#L1168-L1175
In case, multiple individual/seperate VLANs, there are chances that the port group name exceeds 80 chars limit as the vlans are part of port group name, this may be improved using a custom attribute (say, cloud.vlan) for the port group, and use network uuid for naming.
@sureshanaparti , can you specify the work to be done for this, please? (documentation? improvement?)
fixed by #10708