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 http://www.vmware.com/go/downloadpatches. 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.
To list image profiles that are provided by the Patch Bundle use following command
The last task is to reboot ESXi host as seen in the output above.
Note 1: The VMware online software depot is located at https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml, therefore you can use this online depot instead of local depot downloaded manually from VMware download site. To allow outgoing HTTP (tcp ports 80,443) you have to enable httpClient rule in ESXi firewall.
esxcli network firewall ruleset set -e true -r httpClient
To list profiles ...
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
To update ESXi host into a particular profile ...
esxcli software profile update -d
https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
-p ESXi-6.0.0-20160302001-no-tools
you can disable it after update
esxcli network firewall ruleset set -e false -r httpClient
Note 2: You can run an ESXCLI vCLI command remotely against a specific host or against a vCenter Server system.
#get esxcli object on particular host
$esxcli = Get-EsxCli -VMhost -V2
#list profiles in patch bundle
$arguments = $esxcli2.software.profile.list.CreateArgs()
#update to patch bundle profile
$arguments = $esxcli2.software.profile.update.CreateArgs()
$arguments.depot = "vmfs/volumes///update-from-esxi6.0-6.0_update02.zip"
$arguments.profile = "ESXi-5.5.0-profile-standard"
$esxcli2.software.profile.update.Invoke($arguments)
References:
VMware Product Patches
VMware : Are ESXi Patches Cumulative
Andreas Peetz : Are ESXi 5.x patches cumulative?
Quickest Way to Patch an ESX/ESXi Using the Command-line
Install-VMHostPatch
Home Lab Upgrade to 6.0u2
First of all you should download patch bundle from VMware Product Patches page available at http://www.vmware.com/go/downloadpatches. 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.
ESXCLI
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/The output will look like this:.zip
[root@esx01:~] esxcli software sources profile list -d /vmfs/volumes/NFS-SYNOLOGY-SATA/ISO/update-from-esxi6.0-6.0_update02.zipNow you can update the system with a specific profile:
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
esxcli software profile update -d /vmfs/volumes/NFS-SYNOLOGY-SATA/ISO/update-from-esxi6.0-6.0_update02.zip -p ESXi-6.0.0-20160302001-no-toolsThe output will look like this:
[root@esx01:~] esxcli software profile update -d /vmfs/volumes/NFS-SYNOLOGY-SATA/ISO/update-from-esxi6.0-6.0_update02.zip -p ESXi-6.0.0-20160302001-no-tools
Update Result Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective. Reboot Required: true
The last task is to reboot ESXi host as seen in the output above.
[root@esx01:~] rebootAfter reboot, you can ssh to ESXi host and verify current version.
[root@esx01:~] esxcli system version get Product: VMware ESXi Version: 6.0.0 Build: Releasebuild-3620759 Update: 2 Patch: 34
Note 1: The VMware online software depot is located at https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml, therefore you can use this online depot instead of local depot downloaded manually from VMware download site. To allow outgoing HTTP (tcp ports 80,443) you have to enable httpClient rule in ESXi firewall.
esxcli network firewall ruleset set -e true -r httpClient
To list profiles ...
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
To update ESXi host into a particular profile ...
esxcli software profile update -d
https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
-p ESXi-6.0.0-20160302001-no-tools
you can disable it after update
esxcli network firewall ruleset set -e false -r httpClient
Note 2: 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
#list profiles in patch bundle
$arguments = $esxcli2.software.profile.list.CreateArgs()
$arguments.depot = "vmfs/volumes///update-from-esxi6.0-6.0_update02.zip"
$esxcli2.software.profile.update.Invoke($arguments)
#update to patch bundle profile
$arguments = $esxcli2.software.profile.update.CreateArgs()
$arguments.depot = "vmfs/volumes/
$arguments.profile = "ESXi-5.5.0-profile-standard"
$esxcli2.software.profile.update.Invoke($arguments)
PowerCLI Install-VMHostPatch
You can also use special PowerCLI cmdlet Install-VMHostPatch- Download the Update file “ESXi Offline Bundle” update-from-esxi6.0-6.0_update02.zip
- Extract the ZIP file and upload the resulting folder to a datastore on the Virtual Host.
- Put host in to maintenance mode
- Open PowerCLI
- Connect-VIServer
- Install-VMHostPatch -HostPath /vmfs/volumes/Datastore/update-from-esxi6.0-6.0_update02/metadata.zip
Note: For Install-VMHostPatch method Patch Bundle must be explicitly unzipped.