Table of Contents

VMware Esxi Upgrade / Patching From Shell

Prerequisites

  1. A login to vmware in order to download updates / patches.
  2. SSH enables on the Esxi hosts.
  3. Your current build and patch number

Determine the current version and build number

Ssh into your esxi host and type the following command(s)

vmware -v;vmware -l

You will get an output similar to the one below

VMware ESXi 6.5.0 build-4887370
VMware ESXi 6.5.0

Next list what build numbers and patches Vmware has avilable by following this link VMware KB1014508. It will look something like this. for Esxi we are interested in the highlighted line which will be a clickable link. Or you can follow this link here VMware KB2143832

Product name Article
VMware Converter Standalone Build numbers and versions of VMware Converter Standalone (2143828)
VMware Data Recovery Build numbers and versions of VMware Data Recovery (2143852)
VMware ESXi/ESX Build numbers and versions of VMware ESXi/ESX (2143832)
VMware Horizon View Build numbers and versions of VMware Horizon View (2143853)
VMware NSX for vSphere Build numbers and versions of VMware NSX for vSphere (2143854)
VMware Site Recovery Manager Build numbers and versions of VMware Site Recovery Manager (2143851)
VMware vCenter Server Build numbers and versions of VMware vCenter Server (2143838)
VMware vCenter Chargeback Build numbers and versions of VMware vCenter Chargeback (2143841)
VMware vCloud Connector Build numbers and versions of VMware vCloud Connector and vCloud Director (2143847)
VMware vCloud Director Build numbers and versions of VMware vCloud Connector and vCloud Director (2143847)
VMware vCloud Networking and Security Build numbers and versions of VMware vCloud Networking and Security (2143848)
VMware vRealize Automation Build numbers and versions of VMware vRealize Automation (2143850)
VMware vRealize Orchestrator Build numbers and versions of VMware vRealize Orchestrator (2143846)
VMware vRealize Operations Manager Build numbers and versions of VMware vRealize Operations Manager (2145975)
VMware vSAN Build numbers and versions of VMware vSAN (2150753)
VMware vShield Build numbers and versions of VMware vShield (2143849)
VMware vSphere Update Manager Build numbers and versions of VMware vSphere Update Manager (2143837)
VMware vSphere Replication Appliance Build numbers and versions of VMware vSphere Replication Appliance (2143840)
VMware vSphere Storage Appliance Build numbers and versions of VMware vSphere Storage Appliance (2145727)
VxRAIL Correlating VxRAIL Release with VMware build numbers (52075)
VMware Cloud Foundation Correlating VMware Cloud Foundation version with the versions of its constituent products (52520)

Important It is recommended to download full builds and or patches instead of downloading individual “VIB'S”. Vmware builds and patches are cumulative this has been true from VMware 6.0 and up.

Once you are ready you can download the build and or patch from VMware here Download Builds And Patches

Download the build and or patch

Once you've downloaded the build and or patch transfer it to the Esxi host on some datastore available.

Note Downloading and using the *zip archive is recommended as mentioned before over downloading and installing individual VIB's.

Understanding the upgrade procedure

There are two ways to update VIBs using the ESCLI command.

- Use either the “esxcli software vib update …” command - Use esxcli software profile update …” command.

The “vib” namespace is typically used with the optional “-n <vib name>” parameter in order to update individual VIBs, where the “profile” namespace is typically used to update the host’s image profile, which may include multiple VIB updates. The key is when applying patches use the “profile” namespace to update the complete image profile opposed to using the “vib” namespace to update selected VIBs.

Before patching using the command line. Please note the distinction between updating individual VIBs vs. updating the image profile.

ESXi software comes as vSphere Installation Bundles (VIBs). The collection of all the VIBs running on a host is referred to as the “Image Profile”.

Patch are essentially updates to VIBs and are distributed as a ZIP archive which is referred to as a patch bundle. These patch bundles can be loaded into Update Manager, or they can be copied to the host and used with the ESXCLI command.

In short you have the following options.

- Install A Build And Or Patch
- Updating A Patch

Patching Upgrading Preparing

This example assumes we uploaded the latest build and patch when this guide was written it was called “ESXi650-201803001.zip” and we placed it in a directory called “esxipatch” on “/vmfs/volumes/datastore1”.

So the full path would be something like this:

/vmfs/volumes/574814b7-867ab27a-2d45-0cc47a753daa/esxipatch/ESXi650-201803001.zip

That is because “datastore1” is only a symlkink to the real name i.e 574814b7-867ab27a-2d45-0cc47a753daa Note that name may of cause vary depending on your setup.

Actual Patching And Or Upgrading

Now based on my own experience I recommend always to install the patch BUT I always update before running a full install of a new build. This is because the risks of the new build failing is slim to none if the “Patch Update” succeeded. This off cause requires 2 reboots.

Right lets get started:

IMPORTANT Put the Esxi host maintenance mode - If possible power off the running guest's on the host as well.

As mentioned we will start by updating first this is done by running the following command “replace the patch with your full path and the patch filename with your patch filename or you will get an error.

/vmfs/volumes/574814b7-867ab27a-2d45-0cc47a753daa/esxipatch] esxcli software vib update -d ESXi650-201803001.zip

You will get a and output like below “which I have trimmed a bit for readability” The important part is in “bold

##############################################################################################################
Installation Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
##############################################################################################################
VIBs Installed: VMW_bootbank_ehci-ehci-hcd_1.0-4vmw.650.0.14.5146846, VMW_bootbank_i40en_1.3.1-5vmw.650.1.26.5969303, VMW_bootbank_igbn_0.1.0.0-15vmw.650.1.36.7388607, VMW_bootbank_ixgben_1.4.1-2vmw.650.1.26.5969303, VMW_bootbank_misc-drivers_6.5.0-1.36.7388607, VMW_bootbank_ne1000_0.8.0-16vmw.650.1.26.5969303, VMW_bootbank_ntg3_4.1.3.0-1vmw.650.1.36.7388607, VMW_bootbank_nvme_1.2.0.32-5vmw.650.1.36.7388607, VMW_bootbank_nvmxnet3_2.0.0.23-1vmw.650.1.36.7388607, VMW_bootbank_pvscsi_0.1-1vmw.650.1.26.5969303, VMW_bootbank_qlnativefc_2.1.50.0-1vmw.650.1.26.5969303, VMW_bootbank_sata-ahci_3.0-26vmw.650.1.26.5969303, VMW_bootbank_usbcore-usb_1.0-3vmw.650.1.26.5969303, VMW_bootbank_vmkata_0.1-1vmw.650.1.36.7388607, VMW_bootbank_vmkusb_0.1-1vmw.650.1.36.7388607, VMW_bootbank_vmw-ahci_1.0.0-39vmw.650.1.26.5969303, VMware_bootbank_cpu-microcode_6.5.0-1.41.7967591, VMware_bootbank_esx-base_6.5.0-1.41.7967591, VMware_bootbank_esx-dvfilter-generic-fastpath_6.5.0-1.36.7388607, VMware_bootbank_esx-tboot_6.5.0-1.41.7967591, VMware_bootbank_esx-xserver_6.5.0-0.23.5969300, VMware_bootbank_lsu-hp-hpsa-plugin_2.0.0-5vmw.650.1.26.5969303, VMware_bootbank_lsu-lsi-lsi-mr3-plugin_1.0.0-10vmw.650.1.26.5969303, VMware_bootbank_lsu-lsi-lsi-msgpt3-plugin_1.0.0-7vmw.650.1.26.5969303, VMware_bootbank_lsu-lsi-megaraid-sas-plugin_1.0.0-8vmw.650.1.26.5969303, VMware_bootbank_lsu-lsi-mpt2sas-plugin_2.0.0-6vmw.650.1.26.5969303, VMware_bootbank_vmware-esx-esxcli-nvme-plugin_1.2.0.10-1.26.5969303, VMware_bootbank_vsan_6.5.0-1.41.7547709, VMware_bootbank_vsanhealth_6.5.0-1.41.7547710, VMware_locker_tools-light_6.5.0-1.33.7273056
##############################################################################################################
VIBs Removed: VMW_bootbank_ehci-ehci-hcd_1.0-3vmw.650.0.0.4564106, VMW_bootbank_i40en_1.1.0-1vmw.650.0.0.4564106, VMW_bootbank_igbn_0.1.0.0-12vmw.650.0.0.4564106, VMW_bootbank_ixgben_1.0.0.0-8vmw.650.0.0.4564106, VMW_bootbank_misc-drivers_6.5.0-0.0.4564106, VMW_bootbank_ne1000_0.8.0-9vmw.650.0.0.4564106, VMW_bootbank_ntg3_4.1.0.0-1vmw.650.0.0.4564106, VMW_bootbank_nvme_1.2.0.32-2vmw.650.0.0.4564106, VMW_bootbank_nvmxnet3_2.0.0.22-1vmw.650.0.0.4564106, VMW_bootbank_pvscsi_0.1-1vmw.650.0.0.4564106, VMW_bootbank_qlnativefc_2.1.30.0-11vmw.650.0.0.4564106, VMW_bootbank_sata-ahci_3.0-22vmw.650.0.0.4564106, VMW_bootbank_usbcore-usb_1.0-3vmw.650.0.0.4564106, VMW_bootbank_vmkata_0.1-1vmw.650.0.0.4564106, VMW_bootbank_vmkusb_0.1-1vmw.650.0.0.4564106, VMW_bootbank_vmw-ahci_1.0.0-32vmw.650.0.0.4564106, VMware_bootbank_cpu-microcode_6.5.0-0.0.4564106, VMware_bootbank_esx-base_6.5.0-0.9.4887370, VMware_bootbank_esx-dvfilter-generic-fastpath_6.5.0-0.0.4564106, VMware_bootbank_esx-tboot_6.5.0-0.0.4564106, VMware_bootbank_esx-xserver_6.5.0-0.0.4564106, VMware_bootbank_lsu-hp-hpsa-plugin_2.0.0-3vmw.650.0.0.4564106, VMware_bootbank_lsu-lsi-lsi-mr3-plugin_1.0.0-7vmw.650.0.0.4564106, VMware_bootbank_lsu-lsi-lsi-msgpt3-plugin_1.0.0-6vmw.650.0.0.4564106, VMware_bootbank_lsu-lsi-megaraid-sas-plugin_1.0.0-7vmw.650.0.0.4564106, VMware_bootbank_lsu-lsi-mpt2sas-plugin_2.0.0-5vmw.650.0.0.4564106, VMware_bootbank_vmware-esx-esxcli-nvme-plugin_1.2.0.10-0.0.4564106, VMware_bootbank_vsan_6.5.0-0.9.4887370, VMware_bootbank_vsanhealth_6.5.0-0.9.4887370, VMware_locker_tools-light_6.5.0-0.0.4564106
##############################################################################################################
VIBs Skipped: VMW_bootbank_ata-libata-92_3.00.9.2-16vmw.650.0.0.4564106, VMW_bootbank_ata-pata-amd_0.3.10-3vmw.650.0.0.4564106, VMW_bootbank_ata-pata-atiixp_0.4.6-4vmw.650.0.0.4564106, VMW_bootbank_ata-pata-cmd64x_0.2.5-3vmw.650.0.0.4564106, VMW_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.650.0.0.4564106, VMW_bootbank_ata-pata-pdc2027x_1.0-3vmw.650.0.0.4564106, VMW_bootbank_ata-pata-serverworks_0.4.3-3vmw.650.0.0.4564106, VMW_bootbank_ata-pata-sil680_0.4.8-3vmw.650.0.0.4564106, VMW_bootbank_ata-pata-via_0.3.3-2vmw.650.0.0.4564106, VMW_bootbank_block-cciss_3.6.14-10vmw.650.0.0.4564106, VMW_bootbank_char-random_1.0-3vmw.650.0.0.4564106, VMW_bootbank_elxnet_11.1.91.0-1vmw.650.0.0.4564106, VMW_bootbank_hid-hid_1.0-3vmw.650.0.0.4564106, VMW_bootbank_ima-qla4xxx_2.02.18-1vmw.650.0.0.4564106, VMW_bootbank_ipmi-ipmi-devintf_39.1-4vmw.650.0.0.4564106, VMW_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.650.0.0.4564106, VMW_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.650.0.0.4564106, VMW_bootbank_lpfc_11.1.0.6-1vmw.650.0.0.4564106, VMW_bootbank_lsi-mr3_6.910.18.00-1vmw.650.0.0.4564106, VMW_bootbank_lsi-msgpt2_20.00.01.00-3vmw.650.0.0.4564106, VMW_bootbank_lsi-msgpt3_12.00.02.00-11vmw.650.0.0.4564106, VMW_bootbank_misc-cnic-register_1.78.75.v60.7-1vmw.650.0.0.4564106, VMW_bootbank_mtip32xx-native_3.9.5-1vmw.650.0.0.4564106, VMW_bootbank_nenic_1.0.0.2-1vmw.650.0.0.4564106, VMW_bootbank_net-bnx2_2.2.4f.v60.10-2vmw.650.0.0.4564106, VMW_bootbank_net-bnx2x_1.78.80.v60.12-1vmw.650.0.0.4564106, VMW_bootbank_net-cdc-ether_1.0-3vmw.650.0.0.4564106, VMW_bootbank_net-cnic_1.78.76.v60.13-2vmw.650.0.0.4564106, VMW_bootbank_net-e1000_8.0.3.1-5vmw.650.0.0.4564106, VMW_bootbank_net-e1000e_3.2.2.1-2vmw.650.0.0.4564106, VMW_bootbank_net-enic_2.1.2.38-2vmw.650.0.0.4564106, VMW_bootbank_net-fcoe_1.0.29.9.3-7vmw.650.0.0.4564106, VMW_bootbank_net-forcedeth_0.61-2vmw.650.0.0.4564106, VMW_bootbank_net-igb_5.0.5.1.1-5vmw.650.0.0.4564106, VMW_bootbank_net-ixgbe_3.7.13.7.14iov-20vmw.650.0.0.4564106, VMW_bootbank_net-libfcoe-92_1.0.24.9.4-8vmw.650.0.0.4564106, VMW_bootbank_net-mlx4-core_1.9.7.0-1vmw.650.0.0.4564106, VMW_bootbank_net-mlx4-en_1.9.7.0-1vmw.650.0.0.4564106, VMW_bootbank_net-nx-nic_5.0.621-5vmw.650.0.0.4564106, VMW_bootbank_net-tg3_3.131d.v60.4-2vmw.650.0.0.4564106, VMW_bootbank_net-usbnet_1.0-3vmw.650.0.0.4564106, VMW_bootbank_net-vmxnet3_1.1.3.0-3vmw.650.0.0.4564106, VMW_bootbank_nhpsa_2.0.6-3vmw.650.0.0.4564106, VMW_bootbank_nmlx4-core_3.16.0.0-1vmw.650.0.0.4564106, VMW_bootbank_nmlx4-en_3.16.0.0-1vmw.650.0.0.4564106, VMW_bootbank_nmlx4-rdma_3.16.0.0-1vmw.650.0.0.4564106, VMW_bootbank_nmlx5-core_4.16.0.0-1vmw.650.0.0.4564106, VMW_bootbank_ohci-usb-ohci_1.0-3vmw.650.0.0.4564106, VMW_bootbank_qedentv_2.0.3.29-1vmw.650.0.0.4564106, VMW_bootbank_qfle3_1.0.2.7-1vmw.650.0.0.4564106, VMW_bootbank_qflge_1.1.0.3-1vmw.650.0.0.4564106, VMW_bootbank_sata-ata-piix_2.12-10vmw.650.0.0.4564106, VMW_bootbank_sata-sata-nv_3.5-4vmw.650.0.0.4564106, VMW_bootbank_sata-sata-promise_2.12-3vmw.650.0.0.4564106, VMW_bootbank_sata-sata-sil24_1.1-1vmw.650.0.0.4564106, VMW_bootbank_sata-sata-sil_2.3-4vmw.650.0.0.4564106, VMW_bootbank_sata-sata-svw_2.3-3vmw.650.0.0.4564106, VMW_bootbank_scsi-aacraid_1.1.5.1-9vmw.650.0.0.4564106, VMW_bootbank_scsi-adp94xx_1.0.8.12-6vmw.650.0.0.4564106, VMW_bootbank_scsi-aic79xx_3.1-5vmw.650.0.0.4564106, VMW_bootbank_scsi-bnx2fc_1.78.78.v60.8-1vmw.650.0.0.4564106, VMW_bootbank_scsi-bnx2i_2.78.76.v60.8-1vmw.650.0.0.4564106, VMW_bootbank_scsi-fnic_1.5.0.45-3vmw.650.0.0.4564106, VMW_bootbank_scsi-hpsa_6.0.0.84-1vmw.650.0.0.4564106, VMW_bootbank_scsi-ips_7.12.05-4vmw.650.0.0.4564106, VMW_bootbank_scsi-iscsi-linux-92_1.0.0.2-3vmw.650.0.0.4564106, VMW_bootbank_scsi-libfc-92_1.0.40.9.3-5vmw.650.0.0.4564106, VMW_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.650.0.0.4564106, VMW_bootbank_scsi-megaraid-sas_6.603.55.00-2vmw.650.0.0.4564106, VMW_bootbank_scsi-megaraid2_2.00.4-9vmw.650.0.0.4564106, VMW_bootbank_scsi-mpt2sas_19.00.00.00-1vmw.650.0.0.4564106, VMW_bootbank_scsi-mptsas_4.23.01.00-10vmw.650.0.0.4564106, VMW_bootbank_scsi-mptspi_4.23.01.00-10vmw.650.0.0.4564106, VMW_bootbank_scsi-qla4xxx_5.01.03.2-7vmw.650.0.0.4564106, VMW_bootbank_shim-iscsi-linux-9-2-1-0_6.5.0-0.0.4564106, VMW_bootbank_shim-iscsi-linux-9-2-2-0_6.5.0-0.0.4564106, VMW_bootbank_shim-libata-9-2-1-0_6.5.0-0.0.4564106, VMW_bootbank_shim-libata-9-2-2-0_6.5.0-0.0.4564106, VMW_bootbank_shim-libfc-9-2-1-0_6.5.0-0.0.4564106, VMW_bootbank_shim-libfc-9-2-2-0_6.5.0-0.0.4564106, VMW_bootbank_shim-libfcoe-9-2-1-0_6.5.0-0.0.4564106, VMW_bootbank_shim-libfcoe-9-2-2-0_6.5.0-0.0.4564106, VMW_bootbank_shim-vmklinux-9-2-1-0_6.5.0-0.0.4564106, VMW_bootbank_shim-vmklinux-9-2-2-0_6.5.0-0.0.4564106, VMW_bootbank_shim-vmklinux-9-2-3-0_6.5.0-0.0.4564106, VMW_bootbank_uhci-usb-uhci_1.0-3vmw.650.0.0.4564106, VMW_bootbank_usb-storage-usb-storage_1.0-3vmw.650.0.0.4564106, VMW_bootbank_vmkplexer-vmkplexer_6.5.0-0.0.4564106, VMW_bootbank_xhci-xhci_1.0-3vmw.650.0.0.4564106, VMware_bootbank_emulex-esx-elxnetcli_11.1.28.0-0.0.4564106, VMware_bootbank_es
##############################################################################################################

If the patch applied succesfully rebot the host from the console.

reboot

Note It may take a considerable time for the host to come up after the reboot 5-10 mins is not unusual if more than 10 minuttes passes I would start to worry but not until then.

Once the host is up we can apply the new build. The procedure is allmost identical as the one we just used.

First we need to see what the 2 images in the update file are called, we need the name as we are going to be very specific as to what build we want to install. And again use the full path to the update file and replace the path and filename with what is right on your system.

esxcli software sources profile list -d /vmfs/volumes/574814b7-867ab27a-2d45-0cc47a753daa/esxipatch/ESXi650-201803001.zip

You will get an output similar to this.

Name                             Vendor        Acceptance Level
-------------------------------  ------------  ----------------
ESXi-6.5.0-20180304001-standard  VMware, Inc.  PartnerSupported
ESXi-6.5.0-20180304001-no-tools  VMware, Inc.  PartnerSupported

In our case we want to install the “standard build” an we do it like this. Again path and filename may differ from your system.

esxcli software profile update -d /vmfs/volumes/574814b7-867ab27a-2d45-0cc47a753daa/esxipatch/ESXi650-201803001.zip -p ESXi-6.5.0-20180304001-standard

You will get a large ourput like before and if succeed reboot your host and you are done. A reboot is recommended even if the result yields that an update is not needed. So let's reboot.

reboot

You can then check whether the new build did successfully apply by running the following command.

vmware -v

And it should hopefully result in giving you the right build number i.e the one you just installed. In this case with this file it will be.

VMware ESXi 6.5.0 build-7967591

IMPORTANT Take the Esxi host out maintenance mode - If you powered off guest during the update power them back on again.