Updating VMware ESXi Host from the Command Line
Check the current ESXi version installed on your server. You can do it in the vSphere Web Client:
Or from the ESXi console using the command:
1 |
vmware -v |
In this example, VMware ESXi 6.7.0 build-1716773 is installed on the server.
How to Install Updates (Patches) on VMware ESXi with ESXCLI Command?
If you want to install security updates/bug fixes/patches on your ESXi host, download the latest patch release for your OS version.
ESXi patches are cumulative, which means they include all previous updates. Always install the latest available update for your ESXi release.
To install the ESXi rollup update offline:
1)Sign in to the VMware website (you can use a personal account) and go to https://my.vmware.com/group/vmware/patch;
2)Select a product: ESXi (Embedded and Installable) and your ESXi build;
3)The latest available update is ESXi670-202201001 (Build Number: 19195723) with the release date 2022-01-25;
4)Download a ZIP file with the update;
5)Use the Datastore Browser to copy the archive to any datastore available to your host (it may be a local disk, an NFS folder, a VMFS LUN connected over iSCSI or Fiber Channel, or an external USB drive connected to your ESXi host). If there is not enough free space, expand the VMFS datastore;
6)Connect to your ESXi host via SSH and put the host in the maintenance mode:
1 |
esxcli system maintenanceMode set --enable=true |
7)To install the patch, run the command:
1 |
esxcli software vib update --depot /vmfs/volumes/63e0c7a5-7dc3216b-5d29-2c44fd7f50ec/!soft/ESXi650-202210001.zip |
1 2 |
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective. Reboot Required: true |
8)Reboot your ESXi host:
1 |
reboot -f |
9)Disable the maintenance mode:
1 |
esxcli system maintenanceMode set --enable=false |
10)Make sure that the OS version has been updated:
1 |
vmware –v |