This article outlines the procedure for installing patches on an ESXi 6.x/7.x/8.x host from the command line using esxcli software vib
commands.
esxcli software profile
commands. For more information, see Upgrade or Update a Host with Image Profiles > vSphere Command-Line Interface ReferenceVMware vSphere ESXi 6.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode
vim-cmd /hostsvc/maintenance_mode_enter
cd /vmfs/volumes/Datastore/DirectoryName
ls
Datastore
is the datastore name where the patch file was uploaded to, and DirectoryName
is the directory you created on the datastore.esxcli
commands:.zip
file, use the -d
option. To install or update a .vib
file use the -v
option.Using the update
command is the recommended method for patch application. Using this command applies all of the newer contents in a patch, including all security fixes. Contents of the patch that are a lower revision than the existing packages on the system are not applied.
Using the install
command overwrites the existing packages in the system with contents of the patch you are installing, including installing new packages and removing old packages. The install
command may downgrade packages on the system and should be used with caution. If required, the install
command can be used to downgrade a system (only for image profiles) when the --allow-downgrade
flag is set.
Using the install
command overwrites the existing packages in the system with contents of the patch you are installing, including installing new packages and removing old packages. The install
command may downgrade packages on the system and should be used with caution. If required, the install
command can be used to downgrade a system (only for image profiles) when the --allow-downgrade
flag is set.
Caution: The install method has the possibility of overwriting existing drivers. If you are using third-party ESXi images or the ESXi host is part of a vSAN cluster, VMware recommends using the update method to prevent an unbootable state or a vSAN node that no longer contributes storage to the cluster.
esxcli software vib install -d "/vmfs/volumes/Datastore/DirectoryName/PatchName.zip"
PatchName.zip
is the name of the patch file you uploaded to the datastore.DirectoryName .
esxcli software vib install -d "/vmfs/volumes/datastore1/patch-directory/server name-201111001.zip"
esxcli software vib install -d "/vmfs/volumes/<UUID>/patch-directory/server name-201111001.zip"
esxcli software vib install -v viburl
viburl
is the URL to the http depot where VIB packages reside.esxcli software vib install -v https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_5.0.0-0.7.515841.vib
esxcli software vib update -d "/vmfs/volumes/Datastore/DirectoryName/PatchName.zip"
PatchName.zip
is the name of the patch file you uploaded to the datastore.DirectoryName.
esxcli software vib update -d "/vmfs/volumes/datastore1/patch-directory/server name-201111001.zip"
esxcli software vib update -d "/vmfs/volumes/<UUID>patch-directory/server name-201111001.zip"
esxcli software vib update -v viburl
viburl
is the URL to the http depot where VIB packages reside.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.vib
esxcli software vib list
esxcli software vib list
Name Version Vendor Acceptance Level Install Date
----------------- --------------------------- ------ ---------------- ------------
ata-pata-amd 0.3.10-3vmw.500.0.0.469512 VMware VMwareCertified 2012-05-04
ata-pata-atiixp 0.4.6-3vmw.500.0.0.469512 VMware VMwareCertified 2012-05-04
ata-pata-cmd64x 0.2.5-3vmw.500.0.0.469512 VMware VMwareCertified 2012-05-04
ata-pata-hpt3x2n 0.3.4-3vmw.500.0.0.469512 VMware VMwareCertified 2012-05-04
reboot
vim-cmd hostsvc/maintenance_mode_exit
VMware Skyline Health Diagnostics for vSphere - FAQ
For more information, also see the following related VMware vSphere Blogs on patching an ESX/ESXi host using Command-line: