Skip to content

Commit 8c5229c

Browse files
weizhouapachedhslove
authored andcommitted
ceph: fix offline volume migration between ceph pools (apache#12103)
1 parent 9c117b9 commit 8c5229c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,11 @@ to support snapshots(backuped) as qcow2 files. */
18261826
*/
18271827
srcFile = new QemuImgFile(KVMPhysicalDisk.RBDStringBuilder(srcPool, sourcePath));
18281828
srcFile.setFormat(sourceFormat);
1829-
destFile = new QemuImgFile(destPath);
1829+
if (destPool.getType() == StoragePoolType.RBD) {
1830+
destFile = new QemuImgFile(KVMPhysicalDisk.RBDStringBuilder(destPool, destPath));
1831+
} else {
1832+
destFile = new QemuImgFile(destPath);
1833+
}
18301834
destFile.setFormat(destFormat);
18311835

18321836
try {

0 commit comments

Comments
 (0)