WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Automating VCSA 5.5 Configurations including SSO Administrator password

Automating VCSA 5.5 Configurations including SSO Administrator password

11.03.2014 by William Lam // 3 Comments

As many of you know, I am a huge fan of the VCSA (vCenter Server Appliance), not only for its ease of deployment and setup but also the fact that I can easily automate the entire deployment in just under a couple of minutes. I have written about this topic in the past using the vpxd_servicecfg command to automate both VCSA 5.0 and VCSA 5.1. I figured it was probably a good idea to update this for latest VCSA 5.5 which includes several new enhancements to vpxd_servicecfg command such as the VMware Customer Experience Improve Program configuration (vTelemtry) among other options that you can explore by simply running the vpxd_servicecfg on the VCSA.

The other reason I wanted to update this for the latest VCSA 5.5 is that I was working with Engineering last week on a project and several of them did not know about this capability of being able to automate the VCSA configuration. Instead of providing them with the raw commands, I thought I would create an updated script that can be shared with the community so that others could also benefit from it. Lastly, I also did this for myself as I deploy a large amount of VCSA for all sorts of testing that I am doing on a regular basis and this would allow me to quickly speed up my deployment by simply going to my own blog 🙂

Below is a shell script that contains several variables that can be edited based on your environment setup and you can run this script over SSH using something like: ssh root@[VCSA-IP] < configureVCSA.sh

#!/bin/bash
# William Lam
# www.virtuallyghetto.com
# Script to automate VCSA 5.5+ Configurations

# User Configurations

# SSO Administrator password (*protected email*)
SSO_ADMINISTRATOR_PASSWORD=VMware1!

# Join Active Directory (following 5 variables required)
JOIN_AD=0
AD_DOMAIN=primp-industries.com
AD_USER=administrator
AD_PASS=mysupersecurepassword
VCENTER_HOSTNAME=vcenter51-1.primp-industries.com

# Enable NTP
ENABLE_NTP=0
NTP_SERVERS=192.168.1.1

# Enable VMware Customer Experience Improvement Program
ENABLE_VC_TELEMTRY=1

################ DO NOT EDIT BEYOND HERE ################
 
echo "Accepting VMware EULA ..."
/usr/sbin/vpxd_servicecfg eula accept

if [ ${JOIN_AD} -eq 1 ]; then
        echo "Configuring vCenter Server hostname ..."
        SHORTHOSTNAME=$(echo ${VCENTER_HOSTNAME} |  cut -d. -f1)
        /bin/hostname ${VCENTER_HOSTNAME}
        echo ${VCENTER_HOSTNAME} > /etc/HOSTNAME
        sed -i "s/localhost/${SHORTHOSTNAME}/g" /etc/hosts
 
        echo "Configuring Active Directory ..."
        /usr/sbin/vpxd_servicecfg ad write "${AD_USER}" "${AD_PASS}" ${AD_DOMAIN}
fi

echo "Enbaling Time Synchronization ..."
if [ ${ENABLE_NTP} -eq 1 ]; then
	/usr/sbin/vpxd_servicecfg timesync write ntp ${NTP_SERVERS} 
else
	/usr/sbin/vpxd_servicecfg timesync write tools 
fi 

echo "Configuring vCenter Server Embedded DB ..."
/usr/sbin/vpxd_servicecfg db write embedded
								 
echo "Configuring vCenter Server SSO w/custom *protected email* password ..."
/usr/sbin/vpxd_servicecfg sso write embedded ${SSO_ADMINISTRATOR_PASSWORD}

echo "Starting the vCenter Server Service ..."
/usr/sbin/vpxd_servicecfg service start

if [[ -e /var/log/vmware/phonehome ]] && [[ ${ENABLE_VC_TELEMTRY} -eq 1 ]]; then
	echo "Enabling vCenter Server Telemtry ..."
	/usr/sbin/vpxd_servicecfg telemetry enable
fi

 

More from my site

  • vCenter Server 6.0 Tidbits Part 10: Automating SSO Admin configurations
  • How to automatically repoint & failover VCSA to another replicated Platform Services Controller (PSC)?
  • Quick Tip - Changing default port for HTTP Reverse Proxy on both vCenter Server & ESXi
  • Which Platform Services Controller (PSC) is my vCenter Server pointing to?
  • Tech Preview of Windows VC to VCSA Migration at VMworld

Categories // Automation, VCSA, vSphere Tags // sso, vCenter Server, vcenter server appliance, VCSA, vcva, vpxd_servicecfg

Comments

  1. *protectedStu says

    11/03/2014 at 5:03 pm

    This is great. Can you add things like setting inventory service size to medium, add AD as identity source & set it as default?

    Reply
    • William Lam says

      11/03/2014 at 5:10 pm

      Did you mean the JVM memory settings?

      Java max memory target modes:
      read : will read settings, in MB
      write : will test and save settings, in MB

      Java max memory options for write/test:
      [tomcat_memsize] [is_memsize] [sps_memsize]
      tomcat_memsize - maximum heap size for the Tomcat JVM in megabytes
      is_memsize - maximum heap size for the Inventory service JVM in megabytes
      sps_memsize - maximum heap size for the SPS service JVM in megabytes

      Adding AD Identity Source in SSO is not available through any programmatic/CLI interfaces, due to the SSO Admin APIs not being available, you'll still need to do this by hand

      Reply
  2. *protectedramg1967 says

    11/04/2014 at 12:59 pm

    Excellent Info. I will try this at home lab. Currently running VC as a virtual machine (Server 2012 R2). Will make necessary changes to the script to fit my environment and deploy during this weekend.

    Thanks

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025