vmware: do not create vm datastore when attach an existing volume on solidfire (#7160)

This commit is contained in:
Wei Zhou 2023-06-01 14:26:57 +02:00 committed by GitHub
parent 0941d01e97
commit b2e9993b0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -2823,7 +2823,10 @@ public class VmwareStorageProcessor implements StorageProcessor {
throw new Exception("A relevant SCSI disk could not be located to use to create a datastore.");
}
morDs = firstHostDatastoreSystemMO.createVmfsDatastore(datastoreName, hostScsiDisk);
morDs = firstHostDatastoreSystemMO.findDatastoreByName(datastoreName);
if (morDs == null) {
morDs = firstHostDatastoreSystemMO.createVmfsDatastore(datastoreName, hostScsiDisk);
}
if (morDs != null) {
waitForAllHostsToMountDatastore(lstHosts, new DatastoreMO(context, morDs));