During the deployment of the Passive or Witness nodes, the VCHA fails with the below error "vCenter HA has an invalid configuration. Remove vCenter HA to destroy the current cluster configuration and set up vCenter HA again"
vCenter 8.x
There is a known issue in 8.0.2 where the cloning of the vCenter nodes fail which is resolved in 8.0 U2 (see KB below)
https://knowledge.broadcom.com/external/article?articleId=375703
The same error is also seen in vCenter Server 8.0 Update 3, but the clone tasks for passive/witness all succeed.
If that is the case - then the scenario in this KB applies whereby a webclient timeout is experienced causing the error, despite what looks like a successful deployment.
(1) Snapshot vCenter - offline snapshots of all vCenters if they are in linked mode
If needed - cleanup up previous failed VCHA deployments using vcha-destroy -f command on the active vCenter.
(2) On vCenter SSH session - vi /etc/vmware/vsphere-ui/webclient.properties
(To edit files with vi - use i for insert mode, make changes and then esc :wq! to save the changes)
(3) By default the session.timeout value is 120 minutes in the webclient.properties file.
If the witness/passive is under 6 hours - the timeout value in this file can be adjusted to 360 (6 hrs).
Adjust the timeout value based on how long it takes to complete the VCHA task to clone all vCenter's.
(4) Restart the vsphere UI service
service-control --stop vsphere-ui;service-control --start vsphere-ui
(5) Restart the VCHA deployment