cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke4...@apache.org
Subject [34/50] git commit: CS-14937 System VMs and Router VMs does not come up after upgrading from 3.0 to Bonita
Date Sun, 27 May 2012 22:30:44 GMT
CS-14937 System VMs and Router VMs does not come up after upgrading from 3.0 to Bonita

Enabling virtual NIC association with distributed vNetwork only in Nexus dvSwitch is enabled.

Conflicts:

	core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ed79950f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ed79950f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ed79950f

Branch: refs/heads/master
Commit: ed79950faa7f671017ac3f0ae0227c88453e2520
Parents: 67bfe23
Author: Sateesh Chodapuneedi <sateesh.chodapuneedi@citrix.com>
Authored: Wed May 16 23:13:57 2012 +0530
Committer: Vijayendra Bhamidipati <vijayendra.bhamidipati@citrix.com>
Committed: Fri May 25 18:04:15 2012 -0700

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java |   27 ++++++++------
 1 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ed79950f/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index d1d3a81..e47aee3 100755
--- a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -1471,12 +1471,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
                 		s_logger.debug("Prepare volume at new device " + _gson.toJson(device));
                     
                     i++;
-                }
-            }
-
-            String dvSwitchUuid;
-            ManagedObjectReference dcMor = hyperHost.getHyperHostDatacenter();
-            DatacenterMO dataCenterMo = new DatacenterMO(context, dcMor);
+                }
+            }
 
             VirtualDevice nic;
             int nicMask = 0;
@@ -1485,12 +1481,19 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
                 s_logger.info("Prepare NIC device based on NicTO: " + _gson.toJson(nicTo));
 
                 Pair<ManagedObjectReference, String> networkInfo = prepareNetworkFromNicInfo(vmMo.getRunningHost(),
nicTo);
-
-                ManagedObjectReference dvsMor = dataCenterMo.getDvSwitchMor(networkInfo.first());
-                dvSwitchUuid = dataCenterMo.getDvSwitchUuid(dvsMor);
-                s_logger.info("Preparing NIC device on dvSwitch : " + dvSwitchUuid);
-
-                nic = VmwareHelper.prepareDvNicDevice(vmMo, networkInfo.first(), nicDeviceType,
networkInfo.second(), dvSwitchUuid, nicTo.getMac(), i, i + 1, true, true);
+                if (mgr.getNexusVSwitchGlobalParameter()) {
+                    String dvSwitchUuid;
+                    ManagedObjectReference dcMor = hyperHost.getHyperHostDatacenter();
+                    DatacenterMO dataCenterMo = new DatacenterMO(context, dcMor);
+                    ManagedObjectReference dvsMor = dataCenterMo.getDvSwitchMor(networkInfo.first());
+                    dvSwitchUuid = dataCenterMo.getDvSwitchUuid(dvsMor);
+                    s_logger.info("Preparing NIC device on dvSwitch : " + dvSwitchUuid);
+                    nic = VmwareHelper.prepareDvNicDevice(vmMo, networkInfo.first(), nicDeviceType,
networkInfo.second(), dvSwitchUuid, nicTo.getMac(), i, i + 1, true, true);
+                } else {
+                    s_logger.info("Preparing NIC device on network " + networkInfo.second());
+                    nic = VmwareHelper.prepareNicDevice(vmMo, networkInfo.first(), nicDeviceType,
networkInfo.second(), nicTo.getMac(), i, i + 1, true, true);
+                }
+                
                 deviceConfigSpecArray[i] = new VirtualDeviceConfigSpec();
                 deviceConfigSpecArray[i].setDevice(nic);
                 deviceConfigSpecArray[i].setOperation(VirtualDeviceConfigSpecOperation.add);


Mime
View raw message