Patching vCenter Server Appliance via CLI
search cancel

Patching vCenter Server Appliance via CLI

book

Article ID: 370115

calendar_today

Updated On:

Products

VMware vCenter Server VMware vCenter Server 6.0 VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

Patching vCenter server via command line interface

Environment

VMware vCenter Server Appliance 6.x

VMware vCenter Server Appliance 7.x

VMware vCenter Server Appliance 8.x

Cause

Unable to patch the vCenter Server due to Network Connectivity Issue, staging is failing

-----------------------------------------------------OR-----------------------------------------------------

Issue with staging the patches through VAMI even after Mounting the ISO locally to the vCenter Server VM 

Resolution

  • Download the full patch ISO(FP.ISO) from the Broadcom Support Portal.
  • Upload the patch to an existing datastore and attach the iso to the vCenter Server VM.
  • SSH to the vCenter Server using FQDN or I.P and login with root account credentials
  • Access the Appliance shell and not Bash Shell to perform the patch
  • Follow KB mentioned here to toggle between bash shell to appliance shell and vice-versa: https://knowledge.broadcom.com/external/article/319670

  • Stage the packages located in the .ISO file mounted to the vCenter Server VM using below command:
software-packages stage --iso --acceptEulas
  • After the staging completes, you can run the below command to either list or install the staged packages:
software-packages list --staged        <======== To verify the version of the mounted ISO

software-packages install --staged <======== To Install the packages which were staged
  •  Once completed, it will give an output stating "Packages upgraded successfully, Reboot is required to complete the installation”.
  • If the patch installation requires a reboot of the appliance, run the following command to reset the appliance.

          shutdown now -r "patch reboot"

Additional Information

Reference document : https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vcenter.upgrade.doc/GUID-5FCA78EC-8637-43A4-8B28-24624E4D5EBA.html