As promised, here is a new script called configureVCSA55.sh that I have put together after learning about a couple new VCSA automation tips here and here. This script will fully automate the configuration of a vCenter Server Appliance (VCSA) 5.5 and once the script has completed, you will have a fully functional vCenter Server Appliance. There are several variables at the top of the script that you will want to edit prior to running the script.
Here is a summary of the high level operations the script is performing and not all operations will be performed, it will depend on the variables that you have configured.
- Accept EULA
- vSphere Inventory Size Configuration
- Active Directory Configuration (optional)
- DNS Search Domain Configuration
- NTP Configuration
- vCenter Server Database Configuration
- vSphere SSO Configuration
- vSphere SSO Identity Source Configuration for Active Directory (optional)
- Active Directory default Identity Source Configuration (optional)
- VMware Telemtry Configuration (optional)
To run the script, you can either SCP the script to a newly deployed VCSA and run it locally in the shell or remotely via SSH using the following command:
ssh root@[VC-IP] < configureVCSA55.sh
I almost never go through a manual configuration of the VCSA anymore (since 5.0) as it just takes way too long! Hopefully you will find this script handy when needing to quickly test something or automating the deployment of a few dozen VCSA which I know of a few customers that are doing on a regular basis 🙂
Randolf says
Did I miss the shell or something that I missed (it has been a while) I wanted to test this internally and I changed the permissions on the script(chmod 777 configureVCSA55.sh) on the vcsa. I ran it (from a temp folder ./configureVCSA55.sh) and getting an error message"
: command not found
: command not found
: command not found
line 31 Syntax error near unexpected token
line 32 etc...
It has been a while, so not sure if I missed something or not.
Thanks,
Al
William Lam says
This looks like you might have downloaded the script to a Windows text editor and then try to upload it to the VCSA which will give you problems. Try using something like EditPlus or Notepad++ which will give you a compatible file which you can then run on the VCSA.
Eddyc says
Notedpad++ returns the same result. What i did was copy the script contents and saved in Notepad++ and it returns the error.
Then I found if we download from the raw content link and edit with notepad++ it will work.
The raw content link is:
https://raw.githubusercontent.com/lamw/vghetto-scripts/master/shell/configureVCSA55.sh
Hope this can helps.
Phong says
Have you had any luck automating any of this with vcsa 6.0? It looks like vmware changed a lot of the vpxd_servicecfg functionality.
William Lam says
What exactly are you trying to automate? since the entire deployment/configuration of VCSA 6.0 can be done using the new "Scripted Install". Take a look here for more details http://www.virtuallyghetto.com/2015/02/ultimate-automation-guide-to-deploying-vcsa-6-0.html
Phong says
Thanks for the reply! That script worked great for me and gets me 85% there, but I'm trying to automate the addition of LDAP as an identity source, add local users, and configure a syslog remote destination.
William Lam says
* I blogged about the adding Identity Source for 5.5 and in 6.0, the script is now available on VCSA by default to use. You can check out /usr/lib/vmidentity/tools/scripts/sso-add-native-ad-idp.sh
* Local OS or SSO users, if the former you can use traditional Linux commands like adduser
* Take a look at this article for syslog configuration http://www.virtuallyghetto.com/2015/03/a-preview-of-native-syslog-support-in-vcsa-6-0.html
avinash says
hi my name avinash i want lean vmware. what is the best practice.