When the VMware vCenter is not available in the virtual network environment, ESXi hosts can be patched using the ESXi Shell via SSH.
You can perform the patching also using vMA but if you put the host in Maintenance Mode, the appliance itself is not available if not installed in a different host. This procedure works also for the free version of vSphere ESXi 5.x.
Download patches
Download the patches from VMware website to your local computer.
Copy patches in the storage
When download is complete, open vSphere client and access the host to be patched.
In Summary panel identify the Resources section, right click the storage name then select option Browse Datastore.
Create a folder named patches, for instance, and copy the patches in the host storage.
Once all files have been copied, in the right side of the window you can see the list of patches ready to be applied to the host.
Access the system
Shutdown all the running virtual machines and put host in maintenance mode. Note the version number.
Enable services
From Configuration panel, select Software > Security Profile then click Properties.
Select ESXi Shell and click Options.
Select Start and stop manually then click Start. Click OK to continue.
Repeat same steps for SSH service. When finished you should see the enabled services with Daemon Running.
Apply patches
Using a tool like PuTTY, connect the host through SSH.
Insert the credential to login the system.
To apply the patches, we use the esxcli command with the syntax:
esxcli software vib update --depot /vmfs/volumes/<StorageName>/<folderName>/file.zip
To identify the Storage name, have a look at Summary > Resources section.
In this example we are going to apply the following patches:
- update-from-esxi5.0-5.0_update02.zip
- ESXi500-201303001.zip
- ESXi500-201305001.zip
From the host console, type the command and apply the patches. It takes a while so be patience.
# esxcli software vib update --depot /vmfs/volumes/local-vmfs1/patches/update-from-esxi5.0-5.0_update02.zip
# esxcli software vib update --depot /vmfs/volumes/local-vmfs1/patches/ESXi500-201303001.zip
# esxcli software vib update --depot /vmfs/volumes/local-vmfs1/patches/ESXi500-201305001.zip
When all patches have been applied successfully, type the command reboot then press ENTER to reboot the host.
When host has been rebooted, Exit Maintenance Mode and restart the virtual machines. Note the version number.
Because ESXi Shell and SSH services were started manually, after rebooting the host they are no longer enabled therefore it is not necessary to stop them.