Skip to content

Commit e59c14a

Browse files
author
Kelven Yang
committed
Disable HA in CloudStack HA manager under VMware
1 parent 29cc885 commit e59c14a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎server/src/com/cloud/ha/HighAvailabilityManagerImpl.java‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import com.cloud.host.HostVO;
5757
import com.cloud.host.Status;
5858
import com.cloud.host.dao.HostDao;
59+
import com.cloud.hypervisor.Hypervisor.HypervisorType;
5960
import com.cloud.server.ManagementServer;
6061
import com.cloud.storage.StorageManager;
6162
import com.cloud.storage.dao.GuestOSCategoryDao;
@@ -185,6 +186,12 @@ public void scheduleRestartForVmsOnHost(final HostVO host, boolean investigate)
185186
if (host.getType() != Host.Type.Routing) {
186187
return;
187188
}
189+
190+
if(host.getHypervisorType() == HypervisorType.VMware) {
191+
s_logger.warn("Skip HA for VMware host " + host.getId());
192+
return;
193+
}
194+
188195
s_logger.warn("Scheduling restart for VMs on host " + host.getId());
189196

190197
final List<VMInstanceVO> vms = _instanceDao.listByHostId(host.getId());
@@ -267,6 +274,12 @@ public void scheduleRestart(VMInstanceVO vm, boolean investigate) {
267274
}
268275
return;
269276
}
277+
278+
if(vm.getHypervisorType() == HypervisorType.VMware) {
279+
s_logger.info("Skip HA for VMware VM " + vm.getInstanceName());
280+
return;
281+
}
282+
270283
if (!investigate) {
271284
if (s_logger.isDebugEnabled()) {
272285
s_logger.debug("VM does not require investigation so I'm marking it as Stopped: " + vm.toString());

0 commit comments

Comments
 (0)