}
@Override
public boolean startSingleVM(String clusterName, String nodeName,
StatusUpdater statusUpdator) {
NodeEntity node = this.clusterEntityMgr.findNodeByName(nodeName);
boolean reserveRawDisks = clusterEntityMgr.findByName(clusterName).getDistroVendor().equalsIgnoreCase(Constants.MAPR_VENDOR);
// For node scale up/down, the disk info in db is not yet updated when powering on it, need to fetch from VC
StartVmSP.StartVmPrePowerOn prePowerOn = new StartVmSP.StartVmPrePowerOn(reserveRawDisks,
VcVmUtil.getVolumes(node.getMoId(), node.getDisks()));
StartVmPostPowerOn query =
new StartVmPostPowerOn(node.fetchAllPortGroups(),
Constants.VM_POWER_ON_WAITING_SEC, clusterEntityMgr);
VcHost host = null;
if (node.getHostName() != null) {
host = VcResourceUtils.findHost(node.getHostName());
}
VcVirtualMachine vcVm = VcCache.getIgnoreMissing(node.getMoId());
if (vcVm == null) {
logger.info("VC vm does not exist for node: " + node.getVmName());
return false;
}
StartVmSP startVMSP = new StartVmSP(vcVm, prePowerOn, query, host);
return VcVmUtil.runSPOnSingleVM(node, startVMSP);
}