Skip to content

Commit 743dd42

Browse files
committed
Merge pull request #1839 from shapeblue/CLOUDSTACK-9683
CLOUDSTACK-9683: system.vm.default.hypervisor will pin the hypervisor for VR too with this fix * pr/1839: CLOUDSTACK-9683: system.vm.default.hypervisor will pin the hypervisor for VR too with this fix Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 parents f68b6e8 + ca8a004 commit 743dd42

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,7 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
977977
_uservmDetailsDao.addDetail(vm.getId(), "cpuOvercommitRatio", cluster_detail_cpu.getValue(), true);
978978
_uservmDetailsDao.addDetail(vm.getId(), "memoryOvercommitRatio", cluster_detail_ram.getValue(), true);
979979
}
980+
980981
vmProfile.setCpuOvercommitRatio(Float.parseFloat(cluster_detail_cpu.getValue()));
981982
vmProfile.setMemoryOvercommitRatio(Float.parseFloat(cluster_detail_ram.getValue()));
982983
StartAnswer startAnswer = null;
@@ -993,7 +994,7 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
993994
if (s_logger.isDebugEnabled()) {
994995
s_logger.debug("VM is being created in podId: " + vm.getPodIdToDeployIn());
995996
}
996-
_networkMgr.prepare(vmProfile, dest, ctx);
997+
_networkMgr.prepare(vmProfile, new DeployDestination(dest.getDataCenter(), dest.getPod(), null, null), ctx);
997998
if (vm.getHypervisorType() != HypervisorType.BareMetal) {
998999
volumeMgr.prepare(vmProfile, dest);
9991000
}

server/src/com/cloud/network/guru/ControlNetworkGuru.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void reserve(NicProfile nic, Network config, VirtualMachineProfile vm, De
136136
assert nic.getTrafficType() == TrafficType.Control;
137137

138138
// we have to get management/private ip for the control nic for vmware/hyperv due ssh issues.
139-
HypervisorType hType = dest.getHost().getHypervisorType();
139+
HypervisorType hType = vm.getHypervisorType();
140140
if (((hType == HypervisorType.VMware) || (hType == HypervisorType.Hyperv)) && isRouterVm(vm)) {
141141
if (dest.getDataCenter().getNetworkType() != NetworkType.Basic) {
142142
super.reserve(nic, config, vm, dest, context);

server/src/com/cloud/network/router/NetworkHelperImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ protected String getNoHypervisorsErrMsgDetails() {
544544
protected List<HypervisorType> getHypervisors(final RouterDeploymentDefinition routerDeploymentDefinition) throws InsufficientServerCapacityException {
545545
final DeployDestination dest = routerDeploymentDefinition.getDest();
546546
List<HypervisorType> hypervisors = new ArrayList<HypervisorType>();
547-
548547
if (dest.getCluster() != null) {
549548
if (dest.getCluster().getHypervisorType() == HypervisorType.Ovm) {
550549
hypervisors.add(getClusterToStartDomainRouterForOvm(dest.getCluster().getPodId()));

0 commit comments

Comments
 (0)