Bulk Upgrade VMware Tools – the manual way

VMware tools is something that significantly increase the performance of the VMs. Most of the time we tend to ignore VM tool upgrade even after ESXi host upgrades. This VM tools upgrade would be challenging if the VM count is too high, in that case we can not upgrade one VM at a time. In that case, we might need to use the batch/bulk upgrades.

In order to do bulk upgrades, we can use 2 different methods.

  1. Bulk Manual way
  2. Power CLI batch upgrade

Today, we are going to look at the Bulk Manual way

Step 01: Access the vSphere or vCenter web console and go the relevant host or cluster resource

Step 02: Go to “VMs and Templates” and click on the folder containing your VMs.

Step 03: click on the “Virtual Machines” tab. For the vSphere Web Client, click on the “Related Objects” tab and then “Virtual Machines”.

Step 04: (since you can’t do a multiple select in the left pane), click on one of the VMs you’d like to upgrade, hold Ctrl and then start clicking the other VMs.

Step 05: Now right-click on one of the VMs, then “Guest” (“Guest OS” in the Web Client), and then Install/Upgrade VMware Tools. Once the “Install/Upgrade VMware Tools” screen pops up, paste the following in the “Advanced Options” and click OK or Continue

/S /v”/qn REBOOT=R”

(this command line switch will do the silent installation without a reboot, but in order to complete the installation, a reboot is mandatory at a later maintenance window)

How to customize vCenter SSO login page

Lets image that you are sick of the default vCenter default login page and want to add your company logo and name into the SSO login page.

It is possible with both Appliance and Windows Based vCenters.

To carry out the task, you will need the below tools & utilities;

Make sure that you use the PNG format although GIF is apparently supported as well. You should also appropriately size images unless you want them to overlap other components on the page.

Adding a custom logo and text

Step 1 – Using putty, log in as root on vCSA, and run the following two commands.

shell

chsh -s /bin/bash root

Step 2 – Using WinSCP, connect to vCSA and copy the logo (PNG file) to the following path.

/usr/lib/vmware-sso/vmware-sts/webapps/websso/resources/img

Step 3 – Switch back to the putty window and run the following commands.

chsh -s /bin/appliancesh root
cd /usr/lib/vmware-sso/vmware-sts/webapps/websso/WEB-INF/views
cp unpentry.jsp unpentry.jsp.org

The first command resets the appliance back to using the default shell. We then switch to the directory of the file controlling the logon page and take a backup of it.

Step 4 – Using the vi editor, we’ll go ahead and edit unpentry.jsp. This allows us to add a custom company logo and text.

vi unpentry.jsp

Type /.png and press Enter. This takes you to the section in the file which governs what images get displayed on the login page. To add customized HTML text to the login page, scroll down to the section starting <div id=”productName”>. Add the text you want to be displayed as shown in the next screenshot. You can include HTML tags such as header size for further effect. Save the file (wq) and exit.

The Login Page CSS

You can play around with login.css style sheet to further tweak the login page. The style sheet can be found under;

  • /usr/lib/vmware-sso/vmware-sts/webapps/websso/resources/css/login.css [vCenter Appliance]
  • C:\ProgramData\VMware\vCenterServer\runtime\VMwareSTSService\webapps\websso\resources\css\login.css [Windows based vCenter]

vCenter Server for Windows

The above procedure equally applies to vCenter Server for Windows, with the process being intrinsically easier to carry out. The only significant differences are paths to the images folder, login (JSP) file, and CSS.

  • C:\ProgramData\VMware\vCenterServer\runtime\VMwareSTSService\webapps\websso\WEB-INF\views\unpentry.jsp
  • C:\ProgramData\VMware\vCenterServer\runtime\VMwareSTSService\webapps\websso\resources\img\<your_graphic>.png
  • C:\ProgramData\VMware\vCenterServer\runtime\VMwareSTSService\webapps\websso\resources\css\login.css

Just copy the logo or graphics you want included to the images folder and use something like notepad to edit unpentry.jsp applying the same changes as outlined earlier.