From 815915d480572f75372fc5ebed0aa7d8ae9077f7 Mon Sep 17 00:00:00 2001 From: Murali reddy Date: Thu, 31 May 2012 16:39:11 +0530 Subject: [PATCH] bug CS-15171: Unable to start any VM after upgrade from 3.0-> Bonita with VMWare Host status CS-15171: resolved fixed reviewed-by: Murali adding missing backward compatibility (pool UUID is stripped down to 32 chars without '-') check while mounting a data store --- .../cloud/hypervisor/vmware/resource/VmwareResource.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 9d7c02d1297..74e24c58c57 100755 --- a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -2518,8 +2518,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa String storeName = getSecondaryDatastoreUUID(storeUrl); URI uri = new URI(storeUrl); - VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext()); - ManagedObjectReference morDatastore = hyperHost.mountDatastore(false, uri.getHost(), 0, uri.getPath(), storeName.replace("-", "")); + VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext()); + ManagedObjectReference morDatastore = null; + morDatastore = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(hyperHost, storeName); + if(morDatastore == null) { + morDatastore = hyperHost.mountDatastore(false, uri.getHost(), 0, uri.getPath(), storeName.replace("-", "")); + } if (morDatastore == null) throw new Exception("Unable to mount secondary storage on host. storeUrl: " + storeUrl);