Skip to content

Commit 80f837b

Browse files
authored
remove volume size check in restoreBackupToVM (#11384)
1 parent d601c17 commit 80f837b

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
@@ -1284,17 +1284,6 @@ public boolean restoreBackupToVM(final Long backupId, final Long vmId) throws Re
12841284
throw new CloudRuntimeException("Unable to create Instance from backup as the backup has a different number of disks than the Instance");
12851285
}
12861286

1287-
int index = 0;
1288-
for (VolumeVO vmVolume: vmVolumes) {
1289-
Backup.VolumeInfo backupVolume = backupVolumes.get(index);
1290-
if (vmVolume.getSize() < backupVolume.getSize()) {
1291-
throw new CloudRuntimeException(String.format(
1292-
"Instance volume size %d[GiB] for volume (%s) is less than the backed-up volume size %d[GiB] for backed-up volume (%s).",
1293-
vmVolume.getSize(), vmVolume.getUuid(), backupVolume.getSize(), backupVolume.getUuid()));
1294-
}
1295-
index++;
1296-
}
1297-
12981287
BackupOffering offering = backupOfferingDao.findByIdIncludingRemoved(backup.getBackupOfferingId());
12991288
if (offering == null) {
13001289
throw new CloudRuntimeException("Failed to find backup offering");

0 commit comments

Comments
 (0)