sureshanaparti commented on code in PR #9528:
URL: https://github.com/apache/cloudstack/pull/9528#discussion_r1743355305


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java:
##########
@@ -1402,7 +1402,10 @@ public KVMPhysicalDisk copyPhysicalDisk(KVMPhysicalDisk 
disk, String name, KVMSt
          */
 
         KVMStoragePool srcPool = disk.getPool();
-        PhysicalDiskFormat sourceFormat = disk.getFormat();
+        /* Linstor images are always stored as RAW, but Linstor uses qcow2 in 
DB,
+           to support snapshots(backuped) as qcow2 files. */
+        PhysicalDiskFormat sourceFormat = srcPool.getType() != 
StoragePoolType.Linstor ?
+                disk.getFormat() : PhysicalDiskFormat.RAW;

Review Comment:
   check in LinstorStorageAdaptor.java - `getPhysicalDisk()` & 
`createPhysicalDisk()` - where KVMPhysicalDisk obj is created and RAW format is 
set (so, I think, no need to set the format RAW with StoragePoolType.Linstor 
pool type check again).



-- 
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