How to update ESXi via CLI

How to update ESXi via CLI

If you don’t want to use VMware Update Manager (VUM) you can leverage several CLI update alternatives.

First of all you should download patch bundle from VMware Product Patches page available at It is important to know that patch bundles are cumulative. That means you need to download and install only the latest Patch Bundle to make ESXi fully patched.


You can use esxcli command on each ESXi host.

To list image profiles that are provided by the Patch Bundle use following command

esxcli software sources profile list -d /path/to/.zip

The output will look like this:

[root@esx01:~] esxcli software sources profile list -d /vmfs/volumes/NFS-SYNOLOG
Name                              Vendor        Acceptance Level
——————————–  ————  —————-
ESXi-6.0.0-20160301001s-no-tools  VMware, Inc.  PartnerSupported
ESXi-6.0.0-20160302001-standard   VMware, Inc.  PartnerSupported
ESXi-6.0.0-20160301001s-standard  VMware, Inc.  PartnerSupported
ESXi-6.0.0-20160302001-no-tools   VMware, Inc.  PartnerSupported

Now you can update the system with specific profile:
esxcli software profile update -d /path/to/.zip -p ESXi-5.5.0-profile-standard

Note: You can run an ESXCLI vCLI command remotely against a specific host or against a vCenter Server system.

ESXCLI over PowerCLI

The same can be done via PowerCLI. The code below is optimized for ESXCLI-Version2 releases in PowerCLI 6.3 R1.

#get esxcli object on particular host
$esxcli = Get-EsxCli -VMhost -V2

#list profiles in patch bundle
$arguments = $

$arguments.depot = “vmfs/volumes///”

#update to patch bundle profile
$arguments = $
$arguments.depot = “vmfs/volumes///”
$arguments.profile = “ESXi-5.5.0-profile-standard”

PowerCLI Install-VMHostPatch

You can also use special PowerCLI cmdlet Install-VMHostPatch

  1. Download the Update file “ESXi Offline Bundle”
  2. Extract the ZIP file and upload the resulting folder to a datastore on the Virtual Host.
  3. Put host in to maintenance mode
  4. Open PowerCLI
  5. Connect-VIServer
  6. Install-VMHostPatch -HostPath /vmfs/volumes/Datastore/update-from-esxi6.0-6.0_update02/
Note: For Install-VMHostPatch method Patch Bundle must be explicitly unzipped. 

VMware Advocacy

Leave a Reply

Your email address will not be published. Required fields are marked *