Platform Health Check Error [platform-vmsp-platform-platform-machines-core : resources are not ok: wrong resource state] [VCFMS-HEALTH-002]kubectl logs -n kube-system -l app=vsphere-csi-controller -c vsphere-csi-controller --previous --timestamps | grep -Ei "Cannot complete|InvalidLogin|failed to"{"level":"error","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"vsphere/virtualcenter.go:212","msg":"failed to login to vc. err: ServerFaultCode: Cannot complete login due to an incorrect user name or password."
{"level":"error","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"vsphere/virtualcenter.go:379","msg":"failed to create govmomi client with err: ServerFaultCode: Cannot complete login due to an incorrect user name or password."
{"level":"error","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"vsphere/virtualcenter.go:381","msg":"failed to connect to vCenter using CA file:
{"level":"warn","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"vsphere/virtualcenter.go:319","msg":"Cannot connect to vCenter after all retry attempts with InvalidLogin
{"level":"error","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"vsphere/virtualcenter.go:765","msg":"failed to connect to VirtualCenter host: \"vCenter_Managing_VMSP_FQDN\". Err: failed to connect to vCenter: ServerFaultCode: Cannot complete login due to an incorrect user name or password."
{"level":"error","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"vanilla/controller.go:226","msg":"failed to get vCenterInstance for vCenter \"vCenter_Managing_VMSP_FQDN\"err=failed to connect to vCenter: ServerFaultCode: Cannot complete login due to an incorrect user name or password.
{"level":"error","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"service/driver.go:198","msg":"failed to init controller. Error: failed to get vCenterInstance for vCenter \"vCenter_Managing_VMSP_FQDN\"err=failed to connect to vCenter: ServerFaultCode: Cannot complete login due to an incorrect user name or password.
{"level":"error","time":"YYYY-MM-DDTHH:MM:SS.Z","caller":"service/driver.go:212","msg":"failed to run the driver. Err: +failed to get vCenterInstance for vCenter \"vCenter_Managing_VMSP_FQDN\"err=failed to connect to vCenter: ServerFaultCode: Cannot complete login due to an incorrect user name or password."{
"check": "platform-vmsp-platform-platform-snapshots-snapshot",
"ok": false,
"error": "unable to create vSphere client: ServerFaultCode: Cannot complete login due to an incorrect user name or password."
}
{
"check": "platform-vmsp-platform-platform-vc-serviceaccount-http",
"ok": false,
"error": "Unexpected status code: 401 expected: 200, response body: \"{\\\"type\\\":\\\"com.vmware.vapi.std.errors.unauthenticated\\\",\\\"value\\\":{\\\"error_type\\\":\\\"UNAUTHENTICATED\\\",\\\"challenge\\\":\\\"SIGN realm=\\\\\\\"71:57:68:##:C3:48:##:4B:D9:##:1C:1A:02:##:89:87:##:D0:##:06\\\\\\\",sts=\\\\\\\https://vCenter_Managing_VMSP_FQDN/sts/STSService/vsphere.local\\\\\\\, Basic realm=\\\\\\\"vCenter\\\\\\\"\\\",\\\"messages\\\":[]}}\""
}
{
"check": "platform-vmsp-platform-validate-resources-vsphere-resources",
"ok": false,
"error": "unable to create vSphere client: ServerFaultCode: Cannot complete login due to an incorrect user name or password."
}
{
"check": "platform-vmsp-platform-validate-template-vsphere-resources",
"ok": false,
"error": "unable to create vSphere client: ServerFaultCode: Cannot complete login due to an incorrect user name or password."
}kubectl get pd -n vmsp-platform vmsp-platform -oyaml | grep thumbprintkubectl get jobs -A | grep -i rotationThe VMSP component automatically rotates its own vCenter service accounts (svc-vcfsp-vc-###). When rotation occurs, the old account is deleted and replaced with a new one, and the source secret (e.g., <cluster-name>-vcenter-main-secret) is updated with the new credentials.
The vCenter certificate thumbprint stored in the VCF Services Runtime 'PackageDeployment' ('spec.values.provider.vsphere.thumbprint') is a SHA-1 fingerprint (40 hex characters). The remediation and rotation code calculates the SHA-256 fingerprint (64 hex characters) of the certificate presented by vCenter and compares the two directly.
Prechecks run within the synthetic-checker pod, which caches the vCenter credentials in memory upon startup. When the secret changes, Kyverno's reload-on-secret-change policy is responsible for restarting this pod to fetch the new credentials and if there is a credentials mismatch the above issue will be reported
To resolve this issue we have to follow a multi-step process and the details are mentioned below:
Note: These steps must be performed from the Control Plane node of the VCF Services Runtime cluster
scp convert_SHA256_reset_SVC_pwd.py mware-system-user@<node-ip>:update-vcenter-cert.shchmod +x /home/vmware-system-user/convert_SHA256_reset_SVC_pwd.py/home/vmware-system-user/convert_SHA256_reset_SVC_pwd.pySynthetic Checker should report the following if there are no Credential or Thumbprint Related Issue noticed post executing the script mentioned in the KB:
SC="https://localhost:30006/status?selector=component=vsp,group%20in%20(vCenter,vsphere,snapshots)"
curl -ks "$SC" | jq 'to_entries[] | {check: .key, ok: .value.ok, error: .value.lastError}'
{
"check": "platform-vmsp-platform-platform-snapshots-snapshot",
"ok": true,
"error": null
}
{
"check": "platform-vmsp-platform-platform-vc-serviceaccount-http",
"ok": true,
"error": null
}
{
"check": "platform-vmsp-platform-validate-resources-vsphere-resources",
"ok": true,
"error": null
}
{
"check": "platform-vmsp-platform-validate-template-vsphere-resources",
"ok": true,
"error": null
}