This is a modernized version of the "Single use ESXUPDATE How To for ESX 4" post I wrote over a year ago.  With more and more people making the transition over to ESXi, it seemed like it was time to have a simple set of instructions to be provided for use in patching ESXi.

 

01: Make sure you have the vMA both installed and configured.

 

02: Download the patch bundle directly from VMware Support. This download will be .zip file.  Do not extract it.

 

03: Use SCP (Windows users use WinSCP) to upload the .zip file to the vi-admin user's home directory (/home/vi-admin) on the vMA.

 

04: Obtain local console access, or SSH (putty), to the vMA virtual machine that the bundle file was uploaded to.

 

Note: In all examples below, 10.10.10.10 would be replaced with the actual IP address (or DNS name) of the ESXi host to be patched.

 

05: Use the vSphere client to put the ESXi 4.x host in maintenance mode.  Alternatively, from the vMA use the command:

 

vicfg-hostops --server 10.10.10.10 --operation enter

 

To next verify that the host is in maintenance mode, run the following command from the vMA.

 

vicfg-hostops --server 10.10.10.10 --operation info

 

The following command may also be used to list running virtual machines.  This is for environments without VMotion or for single hosts.

 

vmware-cmd --server 10.10.10.10 -l

 

The following command may also be used to stop running virtual  machines.  This is for environments without VMotion or for single hosts.

 

vmware-cmd --server 10.10.10.10 <vm-path> stop soft

 

06: Verify which bundles are already installed on the ESXi host, using the command:

 

vihostupdate --server 10.10.10.10 --query

 

Note: You will next be prompted for a username and password when running this and any subsequent commands that connect to an ESXi host.

 

07. Find out which bulletins are available in the bundle.

 

vihostupdate --server 10.10.10.10 --list --bundle ~/<bundle-name>

 

Note: In the example above, the bundle-file would be located in the vi-admin user's home directory.  The list here should be reviewed for accuracy and to ensure that the correct bundle file was downloaded and copied to the vMA.

 

08. Find out which bulletins are applicable to the ESXi host.

 

vihostupdate --server 10.10.10.10 --scan --bundle ~/<bundle-name>

 

09: Finally, the bundle is installed using the command:

vihostupdate --server 10.10.10.10 --install --bundle ~/<bundle-name>

 

10. When (or IF) prompted to reboot, use the vSphere client or the following command from the vMA:

 

vicfg-hostops --server 10.10.10.10 --operation reboot


Note: Not all patches will require an ESXi host reboot.  You will be prompted, when required.

 

11: After the ESXi host boots, verify the patch bundle was installed from the vMA with the command:

 

vihostupdate --server 10.10.10.10 --query

 

12: If applicable, take the ESXi host out of maintenance mode using the vSphere client or from the vMA with the command:

 

vicfg-hostops --server 10.10.10.10 --operation exit

 

13: If applicable, restart virtual machines using the vSphere client or from the vMA with the command:

 

vmware-cmd --server 10.10.10.10 <vm-path> start

 

As always, thanks for reading!