You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/01/12 07:53:39 UTC

[cloudstack] branch 4.14 updated: vmware: Fixed instance creation failure on dvswitch when using vlan id 4095 (#4557)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.14
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.14 by this push:
     new ec4d83d  vmware: Fixed instance creation failure on dvswitch when using vlan id 4095 (#4557)
ec4d83d is described below

commit ec4d83da4df78c48e7065a912b724ef389708068
Author: Spaceman1984 <49...@users.noreply.github.com>
AuthorDate: Tue Jan 12 09:53:16 2021 +0200

    vmware: Fixed instance creation failure on dvswitch when using vlan id 4095 (#4557)
    
    Fixed instance creation failure on dvswitch when using vlan id 4095
---
 .../java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java b/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
index 7826bb1..c43395d 100644
--- a/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
+++ b/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
@@ -1073,6 +1073,10 @@ public class HypervisorHostHelper {
     }
 
     public static VmwareDistributedVirtualSwitchVlanSpec createDVPortVlanSpec(Integer vlanId, String vlanRange) {
+        if (vlanId != null && vlanId == 4095){
+            vlanId = null;
+            vlanRange = "0-4094";
+        }
         if (vlanId == null && vlanRange != null && !vlanRange.isEmpty()) {
             s_logger.debug("Creating dvSwitch port vlan-trunk spec with range: " + vlanRange);
             VmwareDistributedVirtualSwitchTrunkVlanSpec trunkVlanSpec = new VmwareDistributedVirtualSwitchTrunkVlanSpec();