As you probably know, vSAN does not need vCenter to work. You can actually create and manage vSAN without vCenter but it’s a bit more… well… you know… not easy 🙂
I’m currently managing a huge vSAN environment with 132 hosts in 10 clusters and I learned the hard way some vSAN hidden stuff that you probably never see in smaller environments.
Still, during normal operation, the vCenter state is regarded as the primary source of truth starting with vSAN 6.6. ESXi hosts are automatically updated with the latest host membership list coming from the vCenter Server. When a vCenter is replaced or recovered from backup however, vCenter host membership list may be out of date. It might also be out-of-date if changes to vSAN cluster membership were done using manual “esxcli” command on the vSAN hosts while vCenter was offline.
I ran into this is issue and the fix or better said, protection is just one command but it’s a bit cumbersome to set it up as you basically need to push it to all hosts.
After doing some Googling, I found a post with what I needed, on William Lam’s blog (a must-read for any Virtualization Engineer or just enthusiast!)
I adapted a bit that script so it can be a bit more flexible and user friendly so I can run it in PowerCLI and setup all hosts in all clusters and not have to ssh in all of them.
$ClusterName = Read-Host -Prompt 'Enter the Cluster name you want to setup VSAN.IgnoreClusterMemberListUpdates' $Value = Read-Host -Prompt 'Enter the value you want to set (1 Enable / 0 Disable)' Write-Host "" Write-Host -ForegroundColor Red "Continue? (Y/N) " $response = Read-Host if ( $response -ne "Y" ) { exit } Write-Host "" Write-Host -ForeGroundColor Red "Setting VSAN.IgnoreClusterMemberListUpdates to" $Value "on Cluster" $ClusterName Write-Host "" Foreach ($vmhost in (Get-Cluster -Name $ClusterName | Get-VMHost)) { $vmhost | Get-AdvancedSetting -Name "VSAN.IgnoreClusterMemberListUpdates" | Set-AdvancedSetting -Value $Value -Confirm:$false } Write-Host "" Write-Host -ForeGroundColor Green "Successfully setup VSAN.IgnoreClusterMemberListUpdates to" $Value "on Cluster" $ClusterName Write-Host ""
Enjoy it!
how do we update esxi configuration tab using powercli
Hey Sree, you have the PowerCLI script at the bottom of the post. You can save it as a ps1 file and call it after connecting to vCenter first
Hello Victor,
Script looks good. However, after updating the cluster member list updates, again we have to manually update esxi configuration. Is there any way for that to be automated.
Thank you in advance.
I don’t know that, unfortunately 😦