CS16171 : Cannot attach ISO on VMware VM due to Invalid datastore path error

Handled upgrade scenario where data store already exists in vCenter


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/eb7746c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/eb7746c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/eb7746c9

Branch: refs/heads/4.0
Commit: eb7746c965e7a107cde0602b190d6cf34e9fe74f
Parents: ecd1ac2
Author: Koushik Das <[email protected]>
Authored: Mon Sep 10 14:26:25 2012 +0530
Committer: Murali Reddy <[email protected]>
Committed: Mon Sep 10 14:26:25 2012 +0530

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/eb7746c9/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index cf4f335..fb75512 100755
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -3161,7 +3161,8 @@ public class VmwareResource implements 
StoragePoolResource, ServerResource, Vmwa
 
             // TODO, check if iso is already attached, or if there is a 
previous
             // attachment
-            String storeName = 
getSecondaryDatastoreUUID(storeUrl).replace("-", "");
+            DatastoreMO secondaryDsMo = new DatastoreMO(getServiceContext(), 
morSecondaryDs);
+            String storeName = secondaryDsMo.getName();
             String isoDatastorePath = String.format("[%s] %s%s", storeName, 
isoStorePathFromRoot, isoFileName);
 
             if (cmd.isAttach()) {

Reply via email to