CLOUDSTACK-6027:CreateVolume from snapshot is failing with S3 on Vmware.

(cherry picked from commit d7ec9ca815)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
This commit is contained in:
Min Chen 2014-02-04 15:04:11 -08:00 committed by Animesh Chaturvedi
parent a439ec9b62
commit 85091e9b6b
1 changed files with 6 additions and 0 deletions

View File

@ -1705,6 +1705,12 @@ public class VmwareStorageProcessor implements StorageProcessor {
throw new Exception(msg);
}
// strip off the extension since restoreVolumeFromSecStorage internally will append suffix there.
if (backedUpSnapshotUuid.endsWith(".ova")){
backedUpSnapshotUuid = backedUpSnapshotUuid.replace(".ova", "");
} else if (backedUpSnapshotUuid.endsWith(".ovf")){
backedUpSnapshotUuid = backedUpSnapshotUuid.replace(".ovf", "");
}
DatastoreMO primaryDsMo = new DatastoreMO(hyperHost.getContext(), morPrimaryDs);
restoreVolumeFromSecStorage(hyperHost, primaryDsMo,
newVolumeName, secondaryStorageUrl, backupPath, backedUpSnapshotUuid);