ESXI Host Patching Method using VMware PowerCli

ESXI Host Patching Method using VMware PowerCli

Image result for upgrade and patching via powercli

Great Video Reference

I. Intro/Scope
We will be Illustrating how to install ESXI host patch release by using VMware PowerCLI Install-VMHostPatch cmdlets and other cmdlets Maintenance Mode and Restart command to quickly patch ESXI with eixsting tool set cmdlet with in PowerCLI.

 

II.  Requirements

1. Download Required VMware Patches and upload to ESXI host Datastore.

a. Download ESXI Patch from Link www.vmware.com/go/downloadpatches

You can search specific Patch release for ESXI host.
https://my.vmware.com/group/vmware/patch#search

b. Once Download to local machine, extract the patch file data from the downloaded zip (e.g.update-from-esxi6.0-6.0_update03 zip)
Upload the extracted content to a folder on the ESXi datastore

c. Current ESXI Host Patch Level- 

2. Make sure you have Powercli install on Local machine.
You can go to www.vmware.com/go/powercli.


III. Install ESXI Patch Level Steps.

1. Open PowerCli -run as administrator-

2. Run the follow Command -Connect to the Server via PowerCLI – “Connect-VIServer ipaddress or Host name

For example, Connect-VISERVER -192.168.2.223,

a. You will prompt to input User ID – type root or Domain\user and password.

b. You will see certificate information from ESXI host.

c. Once you logged into the ESX host – You will see user ID and connection is 443.

 

3. Place the Standalone ESXI host into Maintenance mode

by running the follow command “Set-VMHost -VMHost ipaddress -State Maintenance”




For example, the command to Patch is – “Install-VMHostPatch -VMHost ipaddress -HostPath /vmfs/volumes/datastorename/folder/metadata.zip”

 

4. SScrollup to to where Install-VMHostPatch , you will see has completed.

5. Scrool down to command line and type the follow command to reboot ESXI Hosst
I.E Res

Reboot the Host to complete the install

*Optional- I normally run the command ping -T to the ESXI host.

once see the TTL is shows up, likely host has been boot back up …

 

6. Log into Vsphere Click to validate ESXI Patch has been applied. For example, you should see ESXI Update 3 Patch – 

 

ESXI Update 3 Patch Level- 5050593

This concludes Applying Patch Release to ESXI Host via VMware Powercli.

Reference
vSphere PowerCli CMDLETs Reference
Install-VMHOSTPatch
https://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/html/Install-VMHostPatch.html

Quickest Way to Patch an ESX/ESXi Using the Command-line
https://blogs.vmware.com/vsphere/2012/02/quickest-way-to-patch-an-esxesxi-using-the-command-line.html

Understanding  ESXI Patches
https://blogs.vmware.com/vsphere/2012/02/understanding-esxi-patches-finding-patches.html 

 


Leave a Reply

Your email address will not be published. Required fields are marked *