Skip to content

Commit d6657f2

Browse files
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3821319 commit d6657f2

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -764,13 +764,6 @@ public UserVm revertToSnapshot(Long vmSnapshotId) throws InsufficientCapacityExc
764764
"In order to revert to a Snapshot without memory you need to first stop the Instance.");
765765
}
766766

767-
if (userVm.getState() == VirtualMachine.State.Running && vmSnapshotVo.getType() == VMSnapshot.Type.Disk) {
768-
throw new InvalidParameterValueException(
769-
"Reverting to the Instance Snapshot is not allowed for running Instances as this would result in an Instance state change. " +
770-
"For running Instances only Snapshots with memory can be reverted. " +
771-
"In order to revert to a Snapshot without memory you need to first stop the Instance.");
772-
}
773-
774767
if (userVm.getState() == VirtualMachine.State.Stopped && vmSnapshotVo.getType() == VMSnapshot.Type.DiskAndMemory) {
775768
throw new InvalidParameterValueException(
776769
"Reverting to the Instance Snapshot is not allowed for stopped Instances when the Snapshot contains memory as this would result in an Instance state change. " +

0 commit comments

Comments
 (0)