Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
addressed review comments
  • Loading branch information
sureshanaparti committed Sep 26, 2025
commit 1cc9e27a873ce2d1d6817e250da755438f4f99cb
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,13 @@ public Pair<Boolean, String> restoreBackedUpVolume(Backup backup, Backup.VolumeI
restoredVolume.setPoolType(pool.getPoolType());
restoredVolume.setPath(restoredVolume.getUuid());
restoredVolume.setState(Volume.State.Copying);
restoredVolume.setFormat(Storage.ImageFormat.QCOW2);
if (pool.getPoolType() == Storage.StoragePoolType.RBD) {
restoredVolume.setFormat(Storage.ImageFormat.RAW);
}
restoredVolume.setSize(backupVolumeInfo.getSize());
restoredVolume.setDiskOfferingId(diskOffering.getId());
if (pool.getPoolType() != Storage.StoragePoolType.RBD) {
restoredVolume.setFormat(Storage.ImageFormat.QCOW2);
} else {
restoredVolume.setFormat(Storage.ImageFormat.RAW);
}

RestoreBackupCommand restoreCommand = new RestoreBackupCommand();
restoreCommand.setBackupPath(backup.getExternalId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ private boolean replaceRbdVolumeWithBackup(KVMStoragePoolManager storagePoolMgr,
qemu = new QemuImg(timeout * 1000, true, false);
if (!createTargetVolume) {
KVMPhysicalDisk rdbDisk = volumeStoragePool.getPhysicalDisk(volumePath);
logger.debug("RBD volume: {}", rdbDisk.toString());
logger.debug("Restoring RBD volume: {}", rdbDisk.toString());
qemu.setSkipTargetVolumeCreation(true);
}
} catch (LibvirtException ex) {
throw new CloudRuntimeException("Failed to create qemu-img command to replace RBD volume with backup", ex);
throw new CloudRuntimeException("Failed to create qemu-img command to restore RBD volume with backup", ex);
}

QemuImgFile srcBackupFile = null;
Expand Down
Loading