From a4d428434daa64221771597985cefa5f70741b96 Mon Sep 17 00:00:00 2001 From: Anthony Xu Date: Wed, 29 May 2013 15:10:49 -0700 Subject: [PATCH] Don't use volume name as snapshot name because volume name may incude space, \ and other special character, which cannot be part of path name in vmware after this commit, snapshot name is volumeUuid_timestring. --- .../com/cloud/storage/snapshot/SnapshotManagerImpl.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index 26aae48ba38..92d80ee6cc8 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -1033,12 +1033,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, // Snapshot Name: VMInstancename + volumeName + timeString String timeString = DateUtil.getDateDisplayString(DateUtil.GMT_TIMEZONE, new Date(), DateUtil.YYYYMMDD_FORMAT); - VMInstanceVO vmInstance = _vmDao.findById(volume.getInstanceId()); - String vmDisplayName = "detached"; - if (vmInstance != null) { - vmDisplayName = vmInstance.getHostName(); - } - String snapshotName = vmDisplayName + "_" + volume.getName() + "_" + timeString; + String snapshotName = volume.getUuid() + "_" + timeString; // Create the Snapshot object and save it so we can return it to the // user