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

This commit is contained in:
Min Chen 2014-02-04 15:04:11 -08:00
parent a3caea7e0a
commit d7ec9ca815
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);