Skip to content

Commit 72969f0

Browse files
abh1sardhslove
authored andcommitted
remove volume size check in restoreBackupToVM (apache#11384)
1 parent 1293271 commit 72969f0

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,17 +1294,6 @@ public boolean restoreBackupToVM(final Long backupId, final Long vmId) throws Re
12941294
throw new CloudRuntimeException("Unable to create Instance from backup as the backup has a different number of disks than the Instance");
12951295
}
12961296

1297-
int index = 0;
1298-
for (VolumeVO vmVolume: vmVolumes) {
1299-
Backup.VolumeInfo backupVolume = backupVolumes.get(index);
1300-
if (vmVolume.getSize() < backupVolume.getSize()) {
1301-
throw new CloudRuntimeException(String.format(
1302-
"Instance volume size %d[GiB] for volume (%s) is less than the backed-up volume size %d[GiB] for backed-up volume (%s).",
1303-
vmVolume.getSize(), vmVolume.getUuid(), backupVolume.getSize(), backupVolume.getUuid()));
1304-
}
1305-
index++;
1306-
}
1307-
13081297
BackupOffering offering = backupOfferingDao.findByIdIncludingRemoved(backup.getBackupOfferingId());
13091298
if (offering == null) {
13101299
throw new CloudRuntimeException("Failed to find backup offering");

0 commit comments

Comments
 (0)