cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Unable to create network with long broadcastUri in vSwitch

Open borisstoyanov opened this issue 1 year ago • 4 comments

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 avatar Aug 09 '24 07:08 borisstoyanov

@borisstoyanov did you mean 4.19 and after?

JoaoJandre avatar Aug 13 '24 12:08 JoaoJandre

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: VMware-vSwitch-VLANs-range

VLANs comma-separated check in vSwitch port group: VMware-vSwitch-VLANs-comma-separated

VLANs range check in dvSwitch port group:

VMware-dvSwitch-VLANs-range

sureshanaparti avatar Aug 23 '24 10:08 sureshanaparti

VLANs range check using trunking in dvSwitch port group:

VMware-dvSwitch-VLAN-trunking-range VMware-dvSwitch-VLAN-trunking-comma-separated-2

VLANs comma-separated check using trunking in dvSwitch port group:

VMware-dvSwitch-VLAN-trunking-comma-separated

sureshanaparti avatar Aug 23 '24 12:08 sureshanaparti

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 avatar Aug 23 '24 14:08 sureshanaparti

@sureshanaparti , can you specify the work to be done for this, please? (documentation? improvement?)

DaanHoogland avatar Mar 05 '25 17:03 DaanHoogland

fixed by #10708

DaanHoogland avatar May 08 '25 06:05 DaanHoogland