mirror of https://github.com/apache/cloudstack.git
Prevent starting a VM in destroyed state (or any state but Stopped) (#5165)
* Prevent starting a VM in destroyed state (or any state but Stopped)
This commit is contained in:
parent
f7cc3c9316
commit
3fd92502bb
|
|
@ -881,8 +881,9 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||
}
|
||||
|
||||
if (state != State.Stopped) {
|
||||
s_logger.debug("VM " + vm + " is not in a state to be started: " + state);
|
||||
return null;
|
||||
String msg = String.format("Cannot start %s in %s state", vm, state);
|
||||
s_logger.warn(msg);
|
||||
throw new CloudRuntimeException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue