Update an ESXi Host from SSH

Notes how to update a VMware ESXi host:

1. Download Patch from VMware

2. Load it on a Datastore (e.g. with scp) on the ESXi host and connect with SSH. SSH Server must be activated if it’s not already done (Host -> Manage -> Services).

3. Show version:

vmware -vl
VMware ESXi 6.5.0 (Build 4887370)
VMware ESXi 6.5.0 Update 1

3a. Optional: List all installed VIB’s:

esxcli software vib list

4. Move all VM’s to another Host or shut down, then activate Maintenance Mode:

vim-cmd hostsvc/maintenance_mode_enter

5. Start Update:

esxcli software vib update -d /vmfs/volumes/datastore1_local/patch/ESXi650-xxxxxxxxxx.zip

6. The updater will show if it’s necessary to reboot the machine.

7. Show new version:

vmware -vl
VMware ESXi 6.5.0 build-7388607
VMware ESXi 6.5.0 Update 1

8. End Maintenance mode:

vim-cmd hostsvc/maintenance_mode_exit

9. Start VM’s again.

 

Leave a Reply