VMware: Patching an standalone ESXi Host

Hi

to update an standalone ESXi Host get the latest patch(es) from VMware Patch Portal Is this example the latest patches from July 2018.

VMware Patch Portal
VMware Patch Portal

and place the patch ESXi600-201807001.zip on a datastore (for this example sshd must be enabled on the ESXi Host).

michael@debdev ~# scp ESXi600-201807001.zip root@yourESXHost:/vmfs/volumes/esxdatastore/

Establish an ssh connection to the host

Use the gui or vim-cmd to suspend or power down all VMs on the Host

~ # vim-cmd vmsvc/getallvms
Vmid                            Name
1                               VM1
3                               VM2
4                               vCenter
~ #  vim-cmd vmsvc/power.suspend 1
~ #  vim-cmd vmsvc/power.suspend 3
~ #  vim-cmd vmsvc/power.suspend 4
~ #  vim-cmd vmsvc/power.getstate 4
Retrieved runtime info
Suspended

set the host into maintenance mode and check if mode is reached

~ # vim-cmd hostsvc/maintenance_mode_enter 
~ # vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode
inMaintenanceMode = true,

Check which patches are already installed

~ # esxcli software vib list 

Install patches. Use -d for zip files and -v for vib files

~ # esxcli software vib update -d /vmfs/volumes/esxdatastore/ESXi600-201807001.zip
Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
...

or use profiles insteaed, this could also remove old packages
Get the list of profiles from the patch file.

~ # esxcli software sources profile list -d /vmfs/volumes/esxdatastore/images/VMware-ESXi-7.0U3-18644231-depot.zip
ESXi-7.0U3-18644231-standard

And install

~ # esxcli software profile update -p ESXi-7.0U3-18644231-standard -d /vmfs/volumes/esxdatastore/images/VMware-ESXi-7.0U3-18644231-depot.zip
~ # esxcli software profile install -p ESXi-7.0U3-18644231-standard -d /vmfs/volumes/esxdatastore/images/VMware-ESXi-7.0U3-18644231-depot.zip --ok-to-remove

Reboot your system

~ # reboot

After reboot some packages must have the current date as install date

~ # esxcli software vib list|grep 2018-09-12
cpu-microcode                  6.0.0-3.87.8934903                     VMware   VMwareCertified   2018-09-12
ehci-ehci-hcd                  1.0-4vmw.600.3.69.5572656              VMware   VMwareCertified   2018-09-12
esx-base                       6.0.0-3.96.9239799                     VMware   VMwareCertified   2018-09-12
esx-dvfilter-generic-fastpath  6.0.0-3.79.6921384                     VMware   VMwareCertified   2018-09-12
...

Check Build Number

~ # vmware -vl
VMware ESXi 6.0.0 build-9239799
VMware ESXi 6.0.0 Update 3

Exit maintenance mode

~ # vim-cmd hostsvc/maintenance_mode_exit 
~ # vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode
inMaintenanceMode = false,

~ # and resume suspended VMs

~ #  vim-cmd vmsvc/power.suspendResume 4

Michael

Leave a Reply