In a previous post I described how we are setting up remote offices for a customer with two-node vSAN clusters. I meant to get this post out right after that previous one, but things happened… Anyways, here’s how we automated those two-node vSAN clusters.
Currently we have 7 of these racks ready with more to come. As these will be installed at distant locations we are extra keen on knowing that they are all configured as they should, and that the configuration is the same cross these multiple locations.
Of course, this calls for automation. And with our favorite automation tool PowerCLI we have put together a script to do the vSAN configuration for us.
The script requires three ESXi hosts installed and accessible, the first two will be the vSAN hosts while the third will be hosting the virtual witness appliance.
In our setup the two vSAN hosts has a total of 6 disks and the witness host has two disk arrays pre-configured. Furthermore we will only use standard vSwitches in this setup.
So, in a few words this is what will happen:
- A new cluster will be created
- The three hosts will added to vCenter (in our setup we are adding the witness host to a different location than the vSAN hosts)
- Configure network for the three hosts
- Create datastores on the witness host
- Deploy and configure the witness appliance
- Start the witness appliance and add the virtual host to vCenter
- Network config for the witness appliance
- Some standard config for all four hosts (DNS, NTP, SSH, Syslog)
- Enable vSAN on cluster
- Creating diskgroups
- Configure witness traffic
- Finalize vSAN cluster configuration with fault domains and specifying witness host
Some of the configurations might be very specific to this setup, and I have not made it as modular as Jase has in his scripts so please be sure to check out those.
The full script is available on GitHub.