bug 11208: When agent reported state is out of sync with CloudStack, stop VM when its state in CloudStack is not in Running or Migrating

This commit is contained in:
Kelven Yang 2011-08-22 16:33:47 -07:00
parent f45b1b2d4d
commit 381f3df553
1 changed files with 1 additions and 1 deletions

View File

@ -1652,7 +1652,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
s_logger.warn(e.getMessage());
}
}
} else if (serverState == State.Stopping) {
} else if (serverState == State.Stopping || serverState == State.Stopped || serverState == State.Expunging || serverState == State.Destroyed || serverState == State.Error) {
s_logger.debug("Scheduling a stop command for " + vm);
_haMgr.scheduleStop(vm, hostId, WorkType.Stop);
} else {