Deploying Supervisor service or vSphere Pod fails with "failed to setup images: failed to add disk <Datastore Name fdc/xxxxx.vmdk>"
status: conditions: - lastProbeTime: null lastTransitionTime: "YY-MM-DDTHH:MM:SSZ" status: "True" type: PodScheduled - lastProbeTime: null lastTransitionTime: "YY-MM-DDTHH:MM:SSZ" reason: UnknownContainerStatuses status: "False" type: Initialized - lastProbeTime: null lastTransitionTime: "YY-MM-DDTHH:MM:SSZ" reason: UnknownContainerStatuses status: "False" type: ContainersReady - lastProbeTime: null lastTransitionTime: "YY-MM-DDTHH:MM:SSZ" reason: UnknownContainerStatuses status: "False" type: Ready message: 'failed to setup images: failed to add disk [<DatastoreName>] fcd/xxxxx.vmdk: VM.AddDevice failed error = context deadline exceeded Post "https://localhost/sdk": context deadline exceeded: ErrImageSetup' phase: Failed qosClass: BestEffort reason: ErrImageSetupFrom the ESXi host, you will see the below log snippets in /var/run/log/spherelet.log
"YY-MM-DDTHH:MM:SSZ" No(5) spherelet[<OP_ID>]: time=""YY-MM-DDTHH:MM:SSZ"" level=error msg="unexpected fault: &{{{{<nil> [{{} msg.disk.hotadd.Failed [{{} 1 scsi2:0}] Failed to add disk 'scsi2:0'.} {{} msg.disk.hotadd.poweron.failed [{{} 1 scsi2:0}] Failed to power on 'scsi2:0'.} {{} msg.disk.noBackEnd [{{} 1 /vmfs/volumes/<Datastore-Name>/fcd/xxxxx.vmdk}] Cannot open the disk '/vmfs/volumes/<Datastore-Name>/fcd/xxxxx.vmdk' or one of the snapshot disks it depends on. } {{} msg.disklib.INVALIDMULTIWRITER [] Thin/TBZ/Sparse disks cannot be opened in multiwriter mode} {{} vob.fssvec.OpenFile.file.failed [] File system specific implementation of OpenFile[file] failed} {{} msg.disk.invalidClusterDisk [{{} 1 VMware ESX} {{} 2 /vmfs/volumes/<Datastore-Name>/fcd/xxxxx.vmdk}] VMware ESX cannot open the virtual disk \"/vmfs/volumes/<Datastore-Name>/fcd/xxxxx.vmdk\" for clustering. Verify that the virtual disk was created using the thick option. }]}}} Failed to add disk 'scsi2:0'.} taskerror: Failed to add disk 'scsi2:0'." VM-OP=AddDevice namespace=svc-contour-domain-cX pod=envoy-xxxxx uid=<UUID>
vSphere with Tanzu 8.x
This issue will occur when the Storage Policy does not have the volume allocation type with "Fully Initialized".
Resolution 1: To Create a New Storage Policy.
Resolution 2: To update the existing Storage Policy.
kubectl delete imagedisk <name> -n vmware-system-kubeimage