Fix UUID for child datastores in all cases (#8057)

This commit is contained in:
Harikrishna 2023-10-18 13:00:55 +05:30 committed by GitHub
parent 4a86a0d233
commit 76ab621a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5210,7 +5210,7 @@ public class VmwareResource extends ServerResourceBase implements StoragePoolRes
String childPath = datacenterName + summary.getName();
poolInfo.setHostPath(childPath);
String uuid = childDsMo.getCustomFieldValue(CustomFieldConstants.CLOUD_UUID);
if (uuid == null) {
if (uuid == null || !uuid.contains("-")) {
uuid = UUID.nameUUIDFromBytes(((pool.getHost() + childPath)).getBytes()).toString();
}
poolInfo.setUuid(uuid);