You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/vmsnapshot/OntapVMSnapshotStrategy.java
+24-34Lines changed: 24 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -155,10 +155,13 @@ public StrategyPriority canHandle(VMSnapshot vmSnapshot) {
155
155
returnStrategyPriority.CANT_HANDLE;
156
156
}
157
157
158
-
// For new snapshots on ONTAP storage, we handle ALL snapshot types to prevent
159
-
// mixed snapshot chains. Memory snapshots will be rejected in takeVMSnapshot()
160
-
// with a clear error message rather than falling back to libvirt snapshots.
158
+
// For new snapshots (Allocated state), check if we can handle this VM
159
+
// ONTAP only supports disk-only snapshots, not memory snapshots
161
160
if (allVolumesOnOntapManagedStorage(vmSnapshot.getVmId())) {
161
+
if (vmSnapshotVO.getType() == VMSnapshot.Type.DiskAndMemory) {
162
+
logger.debug("canHandle: Memory snapshots (DiskAndMemory) are not supported for VMs on ONTAP storage. VMSnapshot [{}]", vmSnapshot.getId());
163
+
returnStrategyPriority.CANT_HANDLE;
164
+
}
162
165
returnStrategyPriority.HIGHEST;
163
166
}
164
167
@@ -167,9 +170,17 @@ public StrategyPriority canHandle(VMSnapshot vmSnapshot) {
0 commit comments