Skip to content

Commit 85091e9

Browse files
minchen07chaturvedia
authored andcommitted
CLOUDSTACK-6027:CreateVolume from snapshot is failing with S3 on Vmware.
(cherry picked from commit d7ec9ca) Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
1 parent a439ec9 commit 85091e9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,12 @@ public Answer createVolumeFromSnapshot(CopyCommand cmd) {
17051705
throw new Exception(msg);
17061706
}
17071707

1708+
// strip off the extension since restoreVolumeFromSecStorage internally will append suffix there.
1709+
if (backedUpSnapshotUuid.endsWith(".ova")){
1710+
backedUpSnapshotUuid = backedUpSnapshotUuid.replace(".ova", "");
1711+
} else if (backedUpSnapshotUuid.endsWith(".ovf")){
1712+
backedUpSnapshotUuid = backedUpSnapshotUuid.replace(".ovf", "");
1713+
}
17081714
DatastoreMO primaryDsMo = new DatastoreMO(hyperHost.getContext(), morPrimaryDs);
17091715
restoreVolumeFromSecStorage(hyperHost, primaryDsMo,
17101716
newVolumeName, secondaryStorageUrl, backupPath, backedUpSnapshotUuid);

0 commit comments

Comments
 (0)