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
This commit is contained in:
Murali reddy 2012-05-31 16:39:11 +05:30
parent 46a8284a26
commit 815915d480
1 changed files with 6 additions and 2 deletions

View File

@ -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);