[VSAN] vSAN Witness incorrect information displayed in vCenter
N.B: First of all, all screenshots and tests are provided in VMware HOL because I didn’t think initially to write an article.
The other day, my colleague told me he had a misconfiguration in vSAN. He “disconnected” and “Removed from inventory” the witness. So, the symptom is clear, vCenter UI believes vSAN Cluster is not in Stretched Cluster mode, so all configuration through vCenter was impossible.
Directly when he asked me to help him, I had multiple solutions in my head for repairing this error. But I was surprised to see that only one worked in my production case:
- Obviously, my first thought was to reconnect the witness => it did not worked
- Click on “CONFIGURE STRETCHED CLUSTER” => it worked only in VMware HOL
- Simple PowerCLI command to configure cluster => it worked only in VMware HOL
- Directly on ESXi/Witness host through => it did not worked
- RVC Command => Worked in all situations
For more information, the two situations didn’t work in my production case but only in VMware HOL because :
- In vCenter UI, I tried to click anyway on “CONFIGURE STRETCHED CLUSTER” to try to force reconfiguration of the vSAN Witness. In production case, I got a message saying that “vSAN was already in Stretched Cluster”
- In PowerCLI, removing vSAN Stretched Cluster through PowerCLI cmmd worked in the VMware HOLD with the possibility to reconfigure the VSAN Witness again through vCenter UI. However, in my production case, it didn’t change anything. The configurations displayed below are always same with PowerCLI or “CONFIGURE STRETCHED CLUSTER”:
For you, and before starting, you can find the normal VMware HOL vSAN configuration below:
All rest of this article is focused on my production case, so I won’t explain in details why some cases (vCenter UI and PowerCLI) worked on my VMware HOL test, and why not it didn’t in my production case.
So, first I thought PowerCLI would help me in this situation because it was only UI display bug..
The first test was to reconfigure vSAN Witness with the same host, obviously didn’t worked because the cluster was considered as already configured.
Syntaxt of this command is:
Set-VsanClusterConfiguration -Configuration (Get-VsanClusterConfiguration “mgmt-cluster-01) -StretchedClusterEnabled $true -PreferredFaultDomain “Preferred” -WitnessHost “esx-11.vcf.sddc.lab”
The second test is the same than the one above, and I had the same error.
N.B: Only worked in VMware HOL
I tried as well to remove the Stretched Cluster to re-add the witness:
When I put this command, I had the possibility to reconfigure the witness again in vCenter UI (CONFIGURE STRETCHED CLUSTER button worked), or directly with another PowerCLI command. In my production case, this command didn’t change anything because I had the same displayed page than the first screenshot of this article. “Already in stretched cluster”
vSAN has a lot of possibilities to configure witness, and the best option in my production case was the RVC Command because it was the only way I could solve the problem.
So, I tried to get the cluster information to know if the vSAN Witness was really configured or no. And without surprise, the cluster was correctly configured. After that, I had two possibilities: either remove the witness directly or replace it.
The replace command is a little bit simpler because the only argument mandatory is the path of the cluster, whereas the remove command asked path of cluster, path of witness host, and name of preferred site.
Obviously, I tried the two options, and both worked as I will explain you below.
For removing the witness, the command is the following one, and when it was OK I had the possibility to configure again the witness through vCenter UI (production and VMware HOL case worked for me).
Code:
vsan.stretchedcluster.remove_witness pathofyourcluster
Below is the screenshot for replacing the witness host:
Code:
vsan.stretchedcluster.config_witness pathofyourcluster pathofyourwitnesshost nameofyourpreferedsite
No responses yet