Volume creation failed with "failed to create volume. Error: ServerFaultCode: CNS AuthZ: Non-vsan datastores type VMFS in createSpecs."
search cancel

Volume creation failed with "failed to create volume. Error: ServerFaultCode: CNS AuthZ: Non-vsan datastores type VMFS in createSpecs."

book

Article ID: 298658

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

A volume failed to create on vSphere CNS (Cloud Native Storage) with CSI plugin (Cloud Storage Interface). It failed with the following error:

"failed to create volume. Error: ServerFaultCode: CNS AuthZ: Non-vsan datastores type VMFS in createSpecs"

Environment

Product Version: 1.9

Resolution

CNS on vSphere is used to provision volumes on vSphere. CSI has been verified as per the following doc and a Storage Class has been created using non-VSAN datastore:

https://docs.pivotal.io/tkgi/1-9/vsphere-cns.html#verify

However when an attempt is made to create a PVC, it fails.

Creation of PVC fails with the following error:
Warning ProvisioningFailed 31m (x16 over 70m) csi.vsphere.vmware.com_vsphere-csi-controller-7f7c7b7d5-fqr6f_38b62106-c5fa-4330-a637-3b79bf788145 failed to provision volume with StorageClass "aaaaaaa": rpc error: code = Internal desc = failed to create volume. Error: ServerFaultCode: CNS AuthZ: Non-vsan datastores type VMFS in createSpecs

Check the Storage Class and PVC:
kubectl describe sc <Storage Class NAME>
kubectl get pvc <Persistent Volume Claim Name>

For non-VSAN storage, if the PVC AccessMode is set to ReadWriteMany, the PVC will fail to provision with the error above. The PVC AccessMode should be ReadWriteOnce. Check the Compatibility Matrix in the link below for details on compatibility between vSphere Version, CSI version, Datastore stores, AccessModes etc.

https://vsphere-csi-driver.sigs.k8s.io/supported_features_matrix.html

Change the AccessMode to ReadWriteOnce for the PVC and recreate it.