slavkap commented on a change in pull request #3724:
URL: https://github.com/apache/cloudstack/pull/3724#discussion_r487055830
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
##########
@@ -947,25 +953,57 @@ public Answer backupSnapshot(final CopyCommand cmd) {
return new CopyCmdAnswer(e.toString());
}
} else {
- final Script command = new Script(_manageSnapshotPath,
cmd.getWaitInMillSeconds(), s_logger);
- command.add("-b", snapshotDisk.getPath());
- command.add("-n", snapshotName);
- command.add("-p", snapshotDestPath);
- if (isCreatedFromVmSnapshot) {
- descName = UUID.randomUUID().toString();
- }
- command.add("-t", descName);
- final String result = command.execute();
- if (result != null) {
- s_logger.debug("Failed to backup snaptshot: " + result);
- return new CopyCmdAnswer(result);
- }
- final File snapFile = new File(snapshotDestPath + "/" +
descName);
- if(snapFile.exists()){
- size = snapFile.length();
+ if (isKVMEnabled) {
+ OutputInterpreter.OneLineParser parser = new
OutputInterpreter.OneLineParser();
+ Script sc = new Script("virsh");
+ sc.add(String.format("qemu-monitor-command %s '{
\"execute\" : \"query-block-jobs\" }'", vmName));
Review comment:
here also is replaced the use of virsh with libvirt's Java API
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]