This article outlines the steps for updating or installing patches on an ESXi host using the command-line interface.
Notes:
- The
updatecommand is the recommended method for applying patches. It applies all newer content in a patch, including security fixes, while ignoring any content with a lower revision than the existing packages on the system.- The
installcommand, on the other hand, overwrites the existing packages with the content from the patch, which may include new packages or removal of old ones. It can also downgrade packages, which is why it should be used cautiously. However, theinstallcommand can be used to downgrade a system (for image profiles only) if the --allow-downgrade flag is set.
Before performing any patch or upgrade activity on an ESXi host, make sure to have a backup of the ESXi host configuration. Follow the official guidance in How to back up and restore the ESXi host configuration.
Note: Broadcom recommends creating a new directory on the datastore and uploading the patch file to this directory.
Before initiating any patch- or upgrade activity, make sure that the ESXi host is in maintenance mode:
# vim-cmd /hostsvc/maintenance_mode_enter# vim-cmd /hostsvc/hostsummary | grep inMaintenanceModeThis command compares the VIB already included in the software profile on the ESXi with the ones included in the specified profile in the offline bundle:
To use the esxcli software profile update:
# esxcli software sources profile list -d /vmfs/volumes/<datastore>/<foldername>/<patchname>.zipor# esxcli software sources profile list -d /vmfs/volumes/<UUID>/<foldername>/<patchname>.zipwhere PatchName.zip is the name of the offline bundle uploaded to the datastore earlier.# esxcli software profile update -p <name_of_the_Image_Profile> -d /vmfs/volumes/<datastore>/<foldername>/<patchname>.zipAttention: Using esxcli software profile install is an invasive and potentially destructive activity. This command will overwrite the full software profile currently installed on the ESXi host against the specified profile included in the offline bundle. Any VIBs that are not included in the profile will be removed from the ESXi host, so if there are any OEM VIBs installed that should be kept, the "install" command should not be used.# esxcli software sources profile list -d /vmfs/volumes/<datastore>/<foldername>/<patchname>.zipor# esxcli software sources profile list -d /vmfs/volumes/<UUID>/<foldername>/<patchname>.zipwhere PatchName.zip is the name of the offline bundle uploaded to the datastore earlier.# esxcli software profile install -p name_of_the_Image_Profile -d /vmfs/volumes/Datastore/DirectoryName/PatchName.zipNotes:If theesxcli software profile updateoresxcli software profile installcommand fails with a[HardwareError]Append a --no-hardware-warning to the command to allow it to process. Further options are available for
Hardware precheck of profile <profile_name> failed with warnings: <CPU_SUPPORT WARNING: The CPU on this host may not be supported in future ESXi releases. Please plan accordingly. Please refer to KB 82794 for more details.>esxcli software profilecommands. The option to bypass hardware compatibility check warnings is only available for ESXi 6.7 Update 1 or later. Do not bypass verification on production systems.Multiple options can be combined. For example
--profile/-p- Specifies the image profile name for the host update. (Required)--depot/-d- Specifies the full remote URL of the depot index.xml or the offline bundle (.zip) file location. (Required)--dry-run- Performs a simulation of the installation, reporting actions without making changes.--force/-f- Bypasses dependency and security checks. Not recommended unless instructed by VMware Support; triggers a warning in the vSphere Client.--maintenance-mode- Simulates maintenance mode for installations that require it but does not affect reboot-required remediations.--allow-downgradesInstalls VIBs that update, downgrade, or are new to the host. Without this option, only updates and new VIBs are installed.--no-live-install- Forces installation to /altbootbank even if live installation is possible; skipped for PXE-booted hosts.--no-sig-check- Disables security verification, including signing, posing a high security risk and triggering a SECURITY ALERT in vSphere Client.--no-hardware-warning- Skips any warnings that occur during the hardware pre-check.--proxy- Defines the proxy server for HTTP, FTP, and HTTPS connections in the format proxy-url:port.--help- For options help.--dry-runand--no-hardware-versioncan be used within the same command at the same time.
Attention: Starting with ESXi 8.0 Update 2, upgrading or updating ESXi using the commandsesxcli software vib updateoresxcli software vib installis no longer supported.
esxcli software vib:# esxcli software vib update -d "/vmfs/volumes/<datastore>/<foldername>/<patchname>.zip"where <patchname>.zip is the name of the patch file uploaded to the datastore.# esxcli software vib update -d "/vmfs/volumes/<UUID>/<foldername>/<patchname>.zip"# esxcli software vib update -v <viburl>where <viburl> is the URL to the http(s) depot where the VIB package resides.# esxcli software vib update -v https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_5.0.0-0.7.515841.vibesxcli software vib, replace esxcli software vib update against esxcli software vib install.# esxcli software vib listExample:Name Version Vendor Acceptance Level Install Date
----------------------------- ------------------------------------- ------ ---------------- ------------
atlantic 1.0.3.0-8vmw.703.0.20.19193900 VMW VMwareCertified 2022-07-11
bnxtnet 216.0.50.0-44vmw.703.0.50.20036589 VMW VMwareCertified 2023-04-26
bnxtroce 216.0.58.0-23vmw.703.0.50.20036589 VMW VMwareCertified 2023-04-26
brcmfcoe 12.0.1500.2-3vmw.703.0.20.19193900 VMW VMwareCertified 2022-07-11
elxiscsi 12.0.1200.0-9vmw.703.0.20.19193900 VMW VMwareCertified 2023-04-26
...# esxcli system shutdown reboot -r 'apply patch'# vim-cmd hostsvc/maintenance_mode_exit