Update ESXi Through CLI
1. Sometimes you will have to update your ESXi through the CLI because the ESXi you want to install has vCenter and you do not have redundant vCenters or cannot move it. If this is the case, you will have to shut down all the VMs on the ESXi and then you will have to patch the ESXi manually through CLI. First, you will have to upload the file to a datastore on the ESXi.
2. The easiest way to do this is to create a folder on your datastore on the ESXi you will have to update through CLI. We will create a folder under the main datastore called “Updates”
3. Once this is done, you can log into the web of the ESXi and start shutting down VMs. WARNING! I do not recommend shutting down the vCenter appliance this way! I have instructions on how to do this through this link https://defiance5050.blogspot.com/2018/08/safely-shutdown-vcenter-appliance.html .
4. Once the systems are all shutdown, you can SSH into the ESXi (I know you can do all the pre-steps through CLI too, but completing the pre-requisites through GUI is much easier than CLI).
5. After you SSH into the ESXi you want to update, enter the following command to put into maintenance mode:
a. “vim-cmd hostsvc/maintenance_mode_enter”
6. Next, use the “esxcli software vib update” command to execute the update. This is VMware’s recommended way of executing updates for ESXis along with the vSphere Patch/Upgrade Manager (you need the vCenter Appliance with vSphere for this to happen though, hence why we still need these instructions).
7. Once it is done, reboot the ESXi by typing in the following:
a. “reboot”
8. After the ESXi has fully rebooted, you can take out of maintenance mode to bring the ESXi back online:
a. “vim-cmd hostsvc/maintenance_mode_exit”
9. Finally, do not forget to turn your vCenter appliance back on and your other systems too! Enjoy!
No comments:
Post a Comment