WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

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

 

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

How to install ESXi 5.5 Patch03 on the new Mac Pro 6,1?

10.31.2014 by William Lam // 23 Comments

install-esxi-mac-pro-6-1-5-edited
I have received several questions from customers asking how to go about installing the latest ESXi 5.5 Update 2 Patch03 on the Apple Mac Pro 6,1. Luckily, I was able to borrow one of the Apple Mac Pro 6,1 we had within VMware Engineering for a couple of days to document the process.

Step 1 - A prerequisite that must be met prior to installing ESXi is to have the Apple boot ROM update on the Mac Pro 6,1 running on MP61.0116.B05 or higher. This great piece of tidbit came from Josh who discovered issues while trying to install ESXi and found out this was a requirement after opening a case with Apple Engineering. It turns out that there is not an EFI update and the ONLY way to update the boot ROM was to install Yosemite (OS X 10.10) as it contains an update which can be applied to the Mac Pro. Thanks Josh for sharing this tip with us!

You can check the boot ROM by either following this Apple KB here or by running system info with an OS X image on a bootable USB device which is what I did to verify as seen in the screenshot below.

install-esxi-mac-pro-6-1-4
Step 2 - Once you have met the prerequisite, you will need to download the offline bundle for ESXi 5.5 Update 2 Patch03 which contains the Mac Pro 6,1 enablement along with other bug fixes. You can do so by going to VMware Patche portal and under ESXi, you should find ESXi550-201410001.zip at the very top.

Step 3 - Next you need to convert this offline bundle into an ISO image that you can load onto a USB device, this is the simplest way to install ESXi. To do so, you will need a Windows system as it uses a tool called VMware Image Builder which is only available for Windows. Image Builder is part of the PowerCLI toolkit which can be downloaded here.

Step 4 - Once PowerCLI has been installed go ahead and launch the it and we are ready to start authoring our ISO image

Step 5 - Add ESXi offline bundle that we download by running the following command:

Add-EsxSoftwareDepot ESXi550-201410001.zip

Step 6 - You will need to select the particular ESXi Image Profile to create your ISO image from, you can view the four Image Profiles by running the following command:

Get-EsxImageProfile | format-wide

Step 7 - You will want to select the one that contains the all patches including security and VMware Tools called ESXi-5.5.0-20141004001-standard by running the following command:

New-EsxImageProfile -CloneProfile "ESXi-5.5.0-20141004001-standard" -name "ESXi55u2-p03" -Vendor virtuallyGhetto

Step 8 - We now need to export the Image Profile we have selected to an ISO by running the following command:

Export-EsxImageProfile -ImageProfile "ESXi55u2-p03" -ExportToISO -filepath C:\VMware-ESXi-5.5u2p03-Mac-Pro-6-1.iso

Step 9 - Once the ISO has been created, you can now create a bootable USB containing your ESXi installation. I like to use Unetbootin but there are several other tools you can use, select whichever one you are comfortable with.

Step 10 - Plug the USB device into your Mac Pro and make sure to hold down the "ALT" key so you can select the device to boot from and you can start your ESXi installation as you would normally.

Here is a screenshot of the Mac Pro running the latest ESXi 5.5 Update 2 Patch03 release:
install-esxi-mac-pro-6-1-6

Thunderbolt Ethernet Adapter Support

I know there were a couple of questions from folks asking whether the Thunderbolt Ethernet Adapter would be recognized by ESXi on the new Mac Pro 6,1 and I can confirm, it does as shown in the screenshot below:

install-esxi-mac-pro-6-1-7
The Mac Pro 6,1 has two on-board Ethernet ports and comes with 6 x Thunderbolt connections, so you can connect quite a bit of networks if you need to.

GPU Passthru Support

I know a couple of you have asked whether the two Radeon 7870 GPU's could be passthru into a guest OS such as Mac OS X or Windows and it looks like they can from the ESXi point of view, however this is not officially supported by VMware, so YMMV on whether the guestOS can actually make use of the GPU.

mac-pro-passthrough-gpu-1
For Windows it looks like it was able to properly detect the GPU (as shown in the screenshot) below and for Mac OS X it does not look like it's properly detecting the GPU. I will see if I can investigate this further but there is a good chance that passthru for Mac OS X guest will not work.

mac-pro-passthrough-gpu-2
mac-pro-passthrough-gpu-3
If you have made it this far and realize you rather not go through that long process (which is quite short actually), then I you will be quite happy to see that I have done the hard work for you and have created an ESXi 5.5 Update 2 Patch03 ISO which you can download here. Hope you enjoy your new Mac Pro and running ESXi on top of it!

Categories // Apple, ESXi, vSphere Tags // apple, ESXi, image builder, mac pro, PowerCLI, vSphere

Automating the silent installation of Site Recovery Manager 5.8 w/Embedded vPostgres DB

10.28.2014 by William Lam // 6 Comments

Last week I had a nice email exchange with Ben Meadowcroft who is the Product Manager for VMware's Site Recovery Manager. While chatting with Ben, I learned about new feature that I was not aware of in the latest SRM 5.8 release which now supports an embedded vPostgres database. Not only does this greatly simplify the installation and not requiring an external database like Microsoft SQL or Oracle, it is also on par in terms scalability with the external databases which is great for customers. I definitely like this improvement in the SRM installation and making it easier to evaluate and POC without requiring a large resource footprint.

UPDATE (11/09/15) - For silent installation of SRM 6.x, please take a look at this article here as some of the install params have changed.

In addition to new database feature, I also learned that SRM supports a silent mode installation which I was not aware of before either. I figured this might come in handy for those needing to automate an SRM deployment given you will need at least two installation: one for the protection site and one for the recovery site. I did not see much documentation on this topic and it has been awhile since I have played with SRM, I thought this would be a good opportunity for some automation goodness as well as checking out some of the new SRM 5.8 features including VSAN support as well as the new vSphere Web Client integration.

In my lab, I wanted to run the a minimal setup and the least amount of Windows 🙂 With that, I was able to use two VCSA, 2 SRM hosts running on Windows 2008 R2 and six Nested ESXi hosts as shown in the diagram below:
silent-installation-of-site-recovery-manager-0
To perform a silent installation of SRM, you need to specify a list of 35 parameters to the actual executable which is quite daunting and can also be quite error prone. It actually took me a few tries before I was able to get it working and I wanted to make easier so that anyone can just consume it. I decided to create a simple Windows batch script called install_srm.bat which wraps all the required parameters in a set of variables that can easily be modified by anyone. Out of the 35, only 31 of the parameters can be edited and of those only 15 is really required to be tweaked (which is clearly noted in the script) but also shown below:

  • SRM_INSTALLER - The full path to the SRM 5.8 installer
  • DR_TXT_VCHOSTNAME - vCenter Server IP/Hostname
  • DR_TXT_VCUSR - vCenter Server Username
  • DR_TXT_VCPWD - vCenter Server Password
  • VC_CERTIFICATE_THUMBPRINT - vCenter Server SSL SHA1 Thumbprint
  • DR_TXT_LSN - SRM Local Site Name
  • DR_TXT_ADMINEMAIL - SRM Admin Email Address
  • DR_CB_HOSTNAME_IP - SRM Server IP/Hostname
  • DR_TXT_CERTPWD - SSL Certificate Password
  • DR_TXT_CERTORG - SSL Certificate Organization Name
  • DR_TXT_CERTORGUNIT - SSL Certification Organization Unit Name
  • DR_EMBEDDED_DB_DSN - SRM DB DSN Name
  • DR_EMBEDDED_DB_USER - SRM DB Username
  • DR_EMBEDDED_DB_PWD - SRM DB Password
  • DR_SERVICE_ACCOUNT_NAME - Windows System Account to run SRM Service

Note: To retrieve the vCenter Server SSL Certificate Thumbprint, you can either view the details using a regular web browser as shown in the screenshot below

Screen Shot 2014-10-27 at 10.11.59 PM
or you can run the following command on a UNIX/Linux using the openssl utility to extract the thumbprint:

echo -n | openssl s_client -connect [VC-IP-ADDRESS]:443 2>/dev/null | openssl x509 -noout -fingerprint -sha1

Depending on the number of SRM installations you require, you will need to modify the script to perform those additional deployments. As you can see below, I have my two SRM sites implemented. I have also gone ahead and paired both my SRM setups as well as deploy and configure the vSphere Replication 5.8 using the vSphere Web Client. I definitely recommend checking out the latest SRM 5.8 release if you have not already and you may also want to consider using the embedded vPostgres database for future SRM installation to help simplify the deployment and management of SRM.

silent-installation-of-site-recovery-manager-9
For those of you who are interested in the variable mappings to the SRM UI installer (which is pretty straight forward), I took screenshots of each step and mapped them for your convenience.

silent-installation-of-site-recovery-manager-1
silent-installation-of-site-recovery-manager-2
silent-installation-of-site-recovery-manager-3
silent-installation-of-site-recovery-manager-4
silent-installation-of-site-recovery-manager-5
silent-installation-of-site-recovery-manager-6
silent-installation-of-site-recovery-manager-7
silent-installation-of-site-recovery-manager-8

Categories // Automation, SRM Tags // site recovery manager, srm, vpostgres, VSAN, vSphere Replication

  • « Previous Page
  • 1
  • …
  • 382
  • 383
  • 384
  • 385
  • 386
  • …
  • 561
  • Next Page »

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

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • 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

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

 

Loading Comments...