I’ve wrote a PowerShell script to set basic settings on a new installed ESXi or check these settings against running systems.
If you don’t have host profiles licensed you can config a small set of basic settings to your whole cluster.
The script could set:
- activate SSH and open port on firewall
- set power management
- create satp rule and MaxIO settings for Datacore
You will need some packages installed on your workstation:
- VMware PowerCLI 5.5 or VMware PowerCLI6.0 (GA)
- DELL PowerGUI you can run the script in PowerShell but with PowerGUI it is easier to change values, you get an output, simple nicer :)
- Download ESXi_config.ps1 script
After all prerequirements are installed you can open the script.
In the first section you enter your VMware environment data
- vCenter Server Name
- Clustername (I use this script against several Cluster and don’t want to change the whole bunch of ESXi servers controlled by vCenter Server everytime.)
The second section is for the values you want to set
- NTP Server
enter your IPaddress / DNS name of your NTP server / if you set this value to $null no change would be made
- SSH activation
set value to ‘1’ an the scripts activates and starts the SSH server and opens the firewall ports / leave ‘0’ an no change wil be made
To set the ESXi energy management set the value to 1 to get ‘HighPerfomance’, 2 for ‘Balanced’ and 3 for ‘LowPower’.
I wrote an artice (ESXi host performance vs. power consumption) a few month ago in which I compared the pro’s and con’s which comes with ‘HighPerformance’ setting.
- ALUA settings (DataCore)
Actually I have only the settings for DataCore SANsymphony V. I’ve used the settings from DataCores Host Configuration Guide. If someone would test settings with his storage and best practises I could add more systems to my script.
You can run this script severall times against you Cluster. The script gives you response that everthing is set fine.