Symptoms:
When a file share is created in a stretched cluster, you may specify the affinityLocation in the file share's configuration spec.
Meanwhile, a storage policy may also be specified for creating the share. There may be an affinity setting specified in the storage policy. The file share's affinityLocation configuration should be aligned with the storage policy's affinity setting. Otherwise, creating a file share will fail with the below error message:
Invoke vim.vsan.VsanFileServiceSystem.reconfigureFileShare failed: (vim.fault.InvalidState) {
--> faultMessage = (vmodl.LocalizableMessage) [
--> (vmodl.LocalizableMessage) {
--> key = 'com.vmware.vsan.fileservice.fault.shareconfigerror',
--> message = 'affinityLocation does not match with storagePolicy'