In this article discuss about the Patch VMware ESXi Host with CLI mode.
Whenever upgrade or update patches prefer the VMware Lifecycle Manager and VMware Update Manager. However, there are situations or issues when you update ESXi using VMware Update Manager / Lifecycle Manager, or even if your ESXi server is not managed by VMware vCenter Server the procedure will help.
VMware ESXi Host Patch Download
Before patching, please read the VMware Docs article about prerequisite.
VMware ESXi Host Maintenace Mode
It is very important that all running Virtual Machines has migrated to another ESXi host before upgrading the host. You can do this by enabling Maintenance Mode on the ESXi host or manually migrate the Virtual Machines.
Enable SSH on ESXi
- Log into VMware vCenter Server, choose Target ESXi host, then select Configure tab and Services and enable SSH service.
- Select SSH and click on Start as shown below.
- Upload Patch Zip file (Example: VMware-ESXi7.0U3f-20036589-depot.zip) to the datastore using WinSCP as shown below.
Install The Patch:
- In order to perform Patch VMware ESXi Host with CLI Connect to your VMware ESXi host using Putty and login with root credentials.
- In this step, you need to put VMware ESXi into Maintenance Mode, and shut down the Existing virtual machines if it’s a standalone VMware ESXi host.
esxcli system maintenanceMode get
esxcli system maintenanceMode set --enable true
3. By using below command check Maintenance Mode Status
esxcli system maintenanceMode get
4. Use the following command to run the installation
esxcli software vib install -d "/vmfs/volumes/Datastore/DirectoryName/PatchName.zip"
5. once VMware ESXi is upgraded successfully restart it.
reboot -f
6. ESXi should now be up and running, so confirm the version by running the following command
vmware -v
7. Exit VMware ESXi from Maintenance Mode by using the following command
esxcli system maintenanceMode set --enable false esxcli system maintenanceMode get
Conclusion:
The article describes Patch VMware ESXi Host with CLI. Please leave a comment if you have any questions.
In Previous article discussed about virtual machine in a virtual environment.