Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -1284,17 +1284,6 @@ public boolean restoreBackupToVM(final Long backupId, final Long vmId) throws Re
throw new CloudRuntimeException("Unable to create Instance from backup as the backup has a different number of disks than the Instance");
}

int index = 0;
for (VolumeVO vmVolume: vmVolumes) {
Backup.VolumeInfo backupVolume = backupVolumes.get(index);
if (vmVolume.getSize() < backupVolume.getSize()) {
throw new CloudRuntimeException(String.format(
"Instance volume size %d[GiB] for volume (%s) is less than the backed-up volume size %d[GiB] for backed-up volume (%s).",
vmVolume.getSize(), vmVolume.getUuid(), backupVolume.getSize(), backupVolume.getUuid()));
}
index++;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abh1sar new volumes restored will have backed-up volumes size, correct? should we update any disk offering for the new size?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users can configure a different disk offering, or a larger size in case of custom disk offering.
Only limitation is that the volume size should not be less than the backed-up volume size.

If not configured, the volume will use the same disk offering and size as the backed-up volume.
So, nothing to configure at this point.


BackupOffering offering = backupOfferingDao.findByIdIncludingRemoved(backup.getBackupOfferingId());
if (offering == null) {
throw new CloudRuntimeException("Failed to find backup offering");
Expand Down
Loading