Skip to content

Commit 4f0640d

Browse files
author
Alena Prokharchyk
committed
CLOUDSTACK-6595: allow to expunge the vm when its in Error state, in addition to Expunging/Destroyed states
1 parent e1095b0 commit 4f0640d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3683,7 +3683,7 @@ public UserVm expungeVm(long vmId) throws ResourceUnavailableException, Concurre
36833683
return vm;
36843684
}
36853685

3686-
if ((vm.getState() != State.Destroyed) && (vm.getState() != State.Expunging)) {
3686+
if (!(vm.getState() == State.Destroyed || vm.getState() == State.Expunging || vm.getState() == State.Error)) {
36873687
CloudRuntimeException ex = new CloudRuntimeException("Please destroy vm with specified vmId before expunge");
36883688
ex.addProxyObject(String.valueOf(vmId), "vmId");
36893689
throw ex;

0 commit comments

Comments
 (0)