diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index ddd2ca0cc9b..fd1f9846d85 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -681,6 +681,9 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma if (snapshotCheck == null) { throw new InvalidParameterValueException("unable to find a snapshot with id " + snapshotId); } + if( !Status.BackedUp.equals(snapshotCheck.getStatus() ) ) { + throw new InvalidParameterValueException("Can't delete snapshotshot " + snapshotId + " due to it is not in BackedUp Status"); + } _accountMgr.checkAccess(caller, null, snapshotCheck);