JoaoJandre commented on code in PR #13020:
URL: https://github.com/apache/cloudstack/pull/13020#discussion_r3169386737


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtCreateDiskOnlyVMSnapshotCommandWrapper.java:
##########
@@ -88,44 +103,70 @@ protected Answer 
takeDiskOnlyVmSnapshotOfRunningVm(CreateDiskOnlyVmSnapshotComma
             dm = resource.getDomain(conn, vmName);
 
             if (dm == null) {
-                return new CreateDiskOnlyVmSnapshotAnswer(cmd, false, 
String.format("Creation of disk-only VM Snapshot failed as we could not find 
the VM [%s].", vmName), null);
+                answer = new CreateDiskOnlyVmSnapshotAnswer(cmd, false,
+                        String.format("Creation of disk-only VM Snapshot 
failed as we could not find the VM [%s].", vmName), null, null);
+                return answer;
             }
 
             VMSnapshotTO target = cmd.getTarget();
             Pair<String, Map<String, Pair<Long, String>>> 
snapshotXmlAndVolumeToNewPathMap = 
createSnapshotXmlAndNewVolumePathMap(volumeObjectTOS, disks, target, resource);
+            if (shouldFreezeVmFilesystemsForSnapshot(cmd)) {
+                freezeVmFilesystems(dm, vmName);
+                filesystemsFrozenByThisWrapper = true;
+                verifyVmFilesystemsFrozen(dm, vmName);
+            }
+            if (shouldSuspendVmForSnapshot(cmd)) {

Review Comment:
   Understood, thanks 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to