slavkap commented on code in PR #11198:
URL: https://github.com/apache/cloudstack/pull/11198#discussion_r2215738985
##########
plugins/storage/image/default/src/main/java/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java:
##########
@@ -74,7 +76,14 @@ private String createObjectNameForExtractUrl(String
installPath, ImageFormat for
}
if (format != null) {
- objectNameInUrl = objectNameInUrl + "." +
format.getFileExtension();
+ if (dataObject.getTO() != null
+ &&
DataObjectType.VOLUME.equals(dataObject.getTO().getObjectType())
+ &&
HypervisorType.KVM.equals(dataObject.getTO().getHypervisorType())) {
+ // Fix: The format of KVM volumes on image store is qcow2
+ objectNameInUrl = objectNameInUrl + "." +
ImageFormat.QCOW2.getFileExtension();
Review Comment:
@weizhouapache, I've checked, and you are right that install_path ends with
.raw
```
*************************** 1. row ***************************
id: 21
store_id: 1
volume_id: 680
zone_id: 1
created: 2025-07-18 10:23:19
last_updated: NULL
job_id: NULL
download_pct: 100
size: 0
physical_size: 0
download_state: DOWNLOADED
checksum: NULL
error_str: NULL
local_path: NULL
install_path: volumes/2/680/873d67fc-df4c-41f1-891d-1f8202b0d17f.raw
url: NULL
download_url:
http://10.2.133.42/userdata/c0e1a78e-752e-44b5-ab70-89f47fec144f/ROOT-426.raw
state: Ready
destroyed: 0
update_count: 2
ref_cnt: 0
updated: 2025-07-18 10:23:42
download_url_created: 2025-07-18 10:23:42
```
--
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]