ceph: fix offline volume migration between ceph pools (#12103)

This commit is contained in:
Wei Zhou 2025-11-28 15:44:00 +01:00 committed by GitHub
parent e23c7ef701
commit 516012a0b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1689,7 +1689,11 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
*/
srcFile = new QemuImgFile(KVMPhysicalDisk.RBDStringBuilder(srcPool, sourcePath));
srcFile.setFormat(sourceFormat);
destFile = new QemuImgFile(destPath);
if (destPool.getType() == StoragePoolType.RBD) {
destFile = new QemuImgFile(KVMPhysicalDisk.RBDStringBuilder(destPool, destPath));
} else {
destFile = new QemuImgFile(destPath);
}
destFile.setFormat(destFormat);
try {