You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2013/06/28 21:34:40 UTC

[1/2] git commit: updated refs/heads/master-6-17-stable to e43dd6e

Updated Branches:
  refs/heads/master-6-17-stable 93712c271 -> e43dd6e0c


CLOUDSTACK-3279 Need mechanism to detect if hotadd for cpu/memory is supported per a specific guest OS supported by VMware.

 Signed-off-by: Sateesh Chodapuneedi <sa...@apache.org>


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

Branch: refs/heads/master-6-17-stable
Commit: 869083f062db5e5467da401275a4c97f9e1a4368
Parents: b6484c3
Author: Sateesh Chodapuneedi <sa...@apache.org>
Authored: Sat Jun 29 00:59:21 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Sat Jun 29 00:59:21 2013 +0530

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java | 14 ++++++++++++--
 .../hypervisor/vmware/mo/VirtualMachineMO.java     | 17 +++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869083f0/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 2a5597d..03dec9c 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -255,6 +255,7 @@ import com.vmware.vim25.ComputeResourceSummary;
 import com.vmware.vim25.DatastoreSummary;
 import com.vmware.vim25.DynamicProperty;
 import com.vmware.vim25.GuestInfo;
+import com.vmware.vim25.GuestOsDescriptor;
 import com.vmware.vim25.HostCapability;
 import com.vmware.vim25.HostFirewallInfo;
 import com.vmware.vim25.HostFirewallRuleset;
@@ -281,6 +282,7 @@ import com.vmware.vim25.VirtualDisk;
 import com.vmware.vim25.VirtualEthernetCard;
 import com.vmware.vim25.VirtualEthernetCardNetworkBackingInfo;
 import com.vmware.vim25.VirtualLsiLogicController;
+import com.vmware.vim25.VirtualMachineConfigOption;
 import com.vmware.vim25.VirtualMachineConfigSpec;
 import com.vmware.vim25.VirtualMachineFileInfo;
 import com.vmware.vim25.VirtualMachineGuestOsIdentifier;
@@ -2505,9 +2507,17 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             VmwareHelper.setBasicVmConfig(vmConfigSpec, vmSpec.getCpus(), vmSpec.getMaxSpeed(),
             vmSpec.getMinSpeed(),(int) (vmSpec.getMaxRam()/(1024*1024)), ramMb,
             translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value(), vmSpec.getLimitCpuUse());
+            String guestOsId = translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value();
+            boolean guestSupportsCpuHotAdd = false;
+            boolean guestSupportsMemoryHotAdd = false;
+            GuestOsDescriptor vmGuestOsDescriptor = vmMo.getGuestOsDescriptor(guestOsId);
+            if (vmGuestOsDescriptor != null) {
+                guestSupportsCpuHotAdd = vmGuestOsDescriptor.isSupportsCpuHotAdd();
+                guestSupportsMemoryHotAdd = vmGuestOsDescriptor.isSupportsMemoryHotAdd();
+            }
 
-            vmConfigSpec.setMemoryHotAddEnabled(true);
-            vmConfigSpec.setCpuHotAddEnabled(true);
+            vmConfigSpec.setMemoryHotAddEnabled(guestSupportsMemoryHotAdd);
+            vmConfigSpec.setCpuHotAddEnabled(guestSupportsCpuHotAdd);
 
             if ("true".equals(vmSpec.getDetails().get(VmDetailConstants.NESTED_VIRTUALIZATION_FLAG))) {
                 s_logger.debug("Nested Virtualization enabled in configuration, checking hypervisor capability");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869083f0/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
index cf5ffde..3e51047 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -45,6 +45,7 @@ import com.vmware.vim25.CustomFieldStringValue;
 import com.vmware.vim25.DistributedVirtualSwitchPortConnection;
 import com.vmware.vim25.DynamicProperty;
 import com.vmware.vim25.GuestInfo;
+import com.vmware.vim25.GuestOsDescriptor;
 import com.vmware.vim25.HttpNfcLeaseDeviceUrl;
 import com.vmware.vim25.HttpNfcLeaseInfo;
 import com.vmware.vim25.HttpNfcLeaseState;
@@ -84,6 +85,7 @@ import com.vmware.vim25.VirtualIDEController;
 import com.vmware.vim25.VirtualLsiLogicController;
 import com.vmware.vim25.VirtualMachineCloneSpec;
 import com.vmware.vim25.VirtualMachineConfigInfo;
+import com.vmware.vim25.VirtualMachineConfigOption;
 import com.vmware.vim25.VirtualMachineConfigSpec;
 import com.vmware.vim25.VirtualMachineConfigSummary;
 import com.vmware.vim25.VirtualMachineFileInfo;
@@ -1593,6 +1595,21 @@ public class VirtualMachineMO extends BaseMO {
 		}
 	}
 
+    public GuestOsDescriptor getGuestOsDescriptor(String guestOsId) throws Exception {
+        GuestOsDescriptor guestOsDescriptor = null;
+        ManagedObjectReference vmEnvironmentBrowser =
+                _context.getVimClient().getMoRefProp(_mor, "environmentBrowser");
+        VirtualMachineConfigOption  vmConfigOption = _context.getService().queryConfigOption(vmEnvironmentBrowser, null, null);
+        List<GuestOsDescriptor> guestDescriptors = vmConfigOption.getGuestOSDescriptor();
+        for (GuestOsDescriptor descriptor : guestDescriptors) {
+            if (guestOsId != null && guestOsId.equalsIgnoreCase(descriptor.getId())) {
+                guestOsDescriptor = descriptor;
+                break;
+            }
+        }
+        return guestOsDescriptor;
+    }
+
 	public void plugDevice(VirtualDevice device) throws Exception {
         VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec();
         //VirtualDeviceConfigSpec[] deviceConfigSpecArray = new VirtualDeviceConfigSpec[1];


[2/2] git commit: updated refs/heads/master-6-17-stable to e43dd6e

Posted by sa...@apache.org.
Merge branch 'master-6-17-stable' of https://git-wip-us.apache.org/repos/asf/cloudstack into master-6-17-stable


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

Branch: refs/heads/master-6-17-stable
Commit: e43dd6e0cf7a79be603e94d9af84c54e524940ee
Parents: 869083f 93712c2
Author: Sateesh Chodapuneedi <sa...@apache.org>
Authored: Sat Jun 29 01:03:57 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Sat Jun 29 01:03:57 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_accounts.py     |   21 +-
 .../component/test_affinity_groups.py           | 1547 +++++++
 test/integration/component/test_baremetal.py    |  122 +
 test/integration/component/test_blocker_bugs.py |  303 --
 .../component/test_explicit_dedication.py       |    3 -
 .../component/test_implicit_planner.py          |    3 -
 .../component/test_netscaler_configs.py         |    2 +-
 test/integration/component/test_netscaler_lb.py |    4 +-
 .../component/test_netscaler_nw_off.py          |    5 +-
 .../component/test_recurring_snapshots.py       |  405 ++
 .../component/test_redundant_router.py          | 4096 +-----------------
 .../component/test_redundant_router_cleanups.py |  675 +++
 ...test_redundant_router_deployment_planning.py | 1006 +++++
 .../test_redundant_router_network_rules.py      | 1416 ++++++
 .../component/test_redundant_router_services.py |  375 ++
 .../component/test_redundant_router_upgrades.py |  486 +++
 .../component/test_shared_networks.py           |    1 +
 test/integration/component/test_snapshot_gc.py  |  474 ++
 .../component/test_snapshot_limits.py           |  384 ++
 test/integration/component/test_snapshots.py    | 2171 +++-------
 .../component/test_storage_motion.py            |    3 -
 test/integration/component/test_volumes.py      |   68 +-
 test/integration/component/test_vpc.py          |   44 +-
 test/integration/component/test_vpc_network.py  |   80 +-
 .../component/test_vpc_network_lbrules.py       |    3 -
 .../component/test_vpc_network_pfrules.py       |    3 -
 .../component/test_vpc_network_staticnatrule.py |    3 -
 .../integration/component/test_vpc_offerings.py |   52 +-
 test/integration/smoke/test_network.py          |    2 +-
 test/integration/smoke/test_nic.py              |    3 -
 test/integration/smoke/test_resource_detail.py  |    3 -
 test/integration/smoke/test_routers.py          |   80 +-
 test/integration/smoke/test_scale_vm.py         |    3 -
 test/integration/smoke/test_snapshots.py        |  345 ++
 test/integration/smoke/test_ssvm.py             |   42 +-
 test/integration/smoke/test_vm_life_cycle.py    |   38 +-
 test/integration/smoke/test_volumes.py          |    1 -
 tools/marvin/marvin/configGenerator.py          |   13 +-
 tools/marvin/marvin/deployDataCenter.py         |   16 +-
 tools/marvin/marvin/integration/lib/base.py     |   38 +-
 ui/scripts/autoscaler.js                        |    2 +-
 41 files changed, 8097 insertions(+), 6244 deletions(-)
----------------------------------------------------------------------