Symptoms:
Persistent volume creation fails and csi-provisioner container in CSI Controller Pod reports the following error:
ProvisioningFailed failed to provision volume with StorageClass "storage-class-name": rpc error: code = Internal desc = no datastores found to create file volume.
VMware vCenter Server 8.x
The PVC has specified an access mode of ReadWriteMany (RWX) and this is not supported by the datastore.
ReadWriteMany is only supported through the use of vSAN File Services on vSAN datastore.
Refer documentation : Compatibility Matrices for vSphere Container Storage Plug-in
Recreate the PVC with accessModes set to ReadWriteOnce.
Or
Create a Storage Class that uses vSAN File Service to access vSAN datastore. Refer to vSAN File Service for more information.
If the no datastores found to create file volume error persists after correctly configuring vSAN File Services and an appropriate storage class please ensure to also check that the correct privileges have been assigned to the CSI driver user in vSphere. For more information, see the Preparing for Installation of vSphere Container Storage Plug-in section in the VMware vSphere Container Storage Plug-in Documentation
(In particular this additional privilege is required for file volumes Host > Configuration > Storage partition configuration)