Skip to content

Commit 9905760

Browse files
Update plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
Co-authored-by: João Jandre <[email protected]>
1 parent e2f801a commit 9905760

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ to support snapshots(backuped) as qcow2 files. */
16091609
} else {
16101610
destFile = new QemuImgFile(destPath, destFormat);
16111611
try {
1612-
boolean isQCOW2 = !sourcePath.endsWith(".raw");
1612+
boolean isQCOW2 = PhysicalDiskFormat.QCOW2.equals(sourceFormat);
16131613
qemu.convert(srcFile, destFile, null, null, new QemuImageOptions(srcFile.getFormat(), srcFile.getFileName(), null),
16141614
null, false, isQCOW2);
16151615
Map<String, String> destInfo = qemu.info(destFile);

0 commit comments

Comments
 (0)