Skip to content

Commit 8a1dff8

Browse files
Spaceman1984rohityadavcloud
authored andcommitted
vmware: Fixed instance creation failure on dvswitch when using vlan id 4095 (apache#4557)
Fixed instance creation failure on dvswitch when using vlan id 4095 (cherry picked from commit ec4d83d) Signed-off-by: Rohit Yadav <[email protected]>
1 parent 6f96b3b commit 8a1dff8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,10 @@ public static VMwareDVSPvlanConfigSpec createDVPortPvlanConfigSpec(int vlanId, i
10731073
}
10741074

10751075
public static VmwareDistributedVirtualSwitchVlanSpec createDVPortVlanSpec(Integer vlanId, String vlanRange) {
1076+
if (vlanId != null && vlanId == 4095){
1077+
vlanId = null;
1078+
vlanRange = "0-4094";
1079+
}
10761080
if (vlanId == null && vlanRange != null && !vlanRange.isEmpty()) {
10771081
s_logger.debug("Creating dvSwitch port vlan-trunk spec with range: " + vlanRange);
10781082
VmwareDistributedVirtualSwitchTrunkVlanSpec trunkVlanSpec = new VmwareDistributedVirtualSwitchTrunkVlanSpec();

0 commit comments

Comments
 (0)