/var/log/vmware/vpxd/vpxd.log the following entries occur,YYYY-MM-DDTHH:MM:SS.###-##:## info vpxd[10034] [Originator@6876 sub=MoHost opID=opId-18b14-105289-d9] WCP exitMaintenanceMode vAPI returns error: Error:--> com.vmware.vapi.std.errors.unauthenticated--> Messages:--> vapi.security.authentication.invalid<Unable to authenticate user>--> YYYY-MM-DDTHH:MM:SS.###-##:## error vpxd[10034] [Originator@6876 sub=MoHost opID=opId-18b14-105289-d9] [Delete] Failed to delete vAPI session. Error:--> Error:--> com.vmware.vapi.std.errors.unauthenticated--> Messages:--> vapi.security.authentication.invalid<Unable to authenticate user>...... YYYY-MM-DDTHH:MM:SS.###-##:## info vpxd[10034] [Originator@6876 sub=Default opID=opId-18b14-105289-d9] [VpxLRO] -- ERROR task-6215 -- host-9421 -- vim.HostSystem.enterMaintenanceMode: vim.fault.InvalidState:--> Result:--> (vim.fault.InvalidState) {--> faultCause = (vmodl.MethodFault) null, --> faultMessage = (vmodl.LocalizableMessage) [--> (vmodl.LocalizableMessage) {--> key = "com.vmware.cdrs.maintenancemode.wcp.entermaintenancemode", --> arg = <unset>, --> message = <unset>FAILED_TO_GET_WCP_CLUSTER_STATUSFailed to get Workload Management cluster status for vCenter <VC_FQDN>
This issue occurs when the Workload Control Plane (WCP) solution user certificate is invalid. This happens due to a duplicate solution user certificate for the WCP service in a vCenter linked mode setup after utilizing the certificate-manager utility. It also occurs if the WCP solution user certificate expires, as early versions defaulted to a two-year validity for the WCP service compared to the standard ten-year validity for other solution users.
Note: Take an offline (powered-off) snapshot of the vCenter Server before proceeding. If operating in Enhanced Linked Mode (ELM), take offline snapshots of all replicating nodes.
Download the script from KB 385107 and upload it to the /root or /tmp directory on the vCenter Server.
Run the script using the command:./vCert.py.
Provide the Single Sign-On (SSO) administrator credentials (e.g., [email protected]).
Select Option 3 from the main menu to manage certificates.
Select Option 2 to manage Solution User certificates.
Select Option 1 to replace with VMCA signed certificates. Alternatively, select the specific option for custom Certificate Authority (CA)-signed certificates if applicable to your environment.
SSH into the vCenter Server where you need to repair the WCP service.
Get the unique Machine ID and hostname by running:/usr/lib/vmware-vmafd/bin/vmafd-cli get-machine-id --server-name localhost hostname -f
Generate the WCP solution user key by running:/usr/lib/vmware-vmca/bin/certool --server localhost --genkey --privkey=/tmp/wcp.key --pubkey=/tmp/wcp.pub
Generate the WCP solution user certificate by running:/usr/lib/vmware-vmca/bin/certool --server=localhost --genCIScert --privkey=/tmp/wcp.key --cert=/tmp/wcp.crt --Name=wcp --Hostname=<VC_FQDN>
Get the WCP service name using the directory command-line interface.The default name is wcp-<machine id>: /usr/lib/vmware-vmafd/bin/dir-cli service list
Update the WCP service with the newly generated WCP certificate: /usr/lib/vmware-vmafd/bin/dir-cli service update --name <insert wcp service name from the service list> --cert /tmp/wcp.crt
Delete the stale WCP solution user entry from the VMware Endpoint Certificate Store (VECS) by running:/usr/lib/vmware-vmafd/bin/vecs-cli entry delete --store wcp --alias wcp -y /usr/lib/vmware-vmafd/bin/vecs-cli force-refresh
Update the new WCP solution user certificate to the VECS store by running:/usr/lib/vmware-vmafd/bin/vecs-cli entry create --store wcp --alias wcp --cert /tmp/wcp.crt --key /tmp/wcp.key
Verify that the WCP certificate updates successfully. The Subject must contain the unique CN as updated in wcp.cfg, along with a new Issue and Expiration date: /usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store wcp --alias wcp --text
Restart all services on the vCenter Server to apply the changes: service-control --stop --all && service-control --start --all