mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6595: allow to expunge the vm when its in Error state, in addition to Expunging/Destroyed states
This commit is contained in:
parent
e1095b0110
commit
4f0640dac4
|
|
@ -3683,7 +3683,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
|
|||
return vm;
|
||||
}
|
||||
|
||||
if ((vm.getState() != State.Destroyed) && (vm.getState() != State.Expunging)) {
|
||||
if (!(vm.getState() == State.Destroyed || vm.getState() == State.Expunging || vm.getState() == State.Error)) {
|
||||
CloudRuntimeException ex = new CloudRuntimeException("Please destroy vm with specified vmId before expunge");
|
||||
ex.addProxyObject(String.valueOf(vmId), "vmId");
|
||||
throw ex;
|
||||
|
|
|
|||
Loading…
Reference in New Issue