CLOUDSTACK-6595: allow to expunge the vm when its in Error state, in addition to Expunging/Destroyed states

This commit is contained in:
Alena Prokharchyk 2014-07-14 14:02:41 -07:00
parent e1095b0110
commit 4f0640dac4
1 changed files with 1 additions and 1 deletions

View File

@ -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;