Updating a VMware vSphere ESXi Host from CLI

Keeping your ESXi hosts updated is important. Using VMware Update Manager (VUM) is the easiest way to keep your ESXi hosts compliant. If you won’t have VUM or are working in a smaller environment, updating a couple hosts via the CLI might be your option.

Here is a transcript of a ESXi host update. The ESXi host will have to be in maintenance mode before it can be updated and SSH server will have to be running to access the CLI of the host.

login as: root
Using keyboard-interactive authentication.
The time and date of this login have been sent to the system logs.

VMware offers supported, powerful system administration tools.  Please
see www.vmware.com/go/sysadmintools for details.

The ESXi Shell can be disabled by an administrative user. See the
vSphere Security documentation for more information.

First check what updates are available in the update, which I previously uploaded in the vCenter content library, but this could be in any datastore accessible

[[email protected]:~] esxcli software sources profile list -d /vmfs/volumes/ContentLibraryDS/contentlib-0fe04e0c-1c9f-4d51-b35d-90e26255d36a/10
Name                         Vendor  Acceptance Level
---------------------------  ------  ----------------
Dell-ESXi-6.0U2-3620759-A00  Dell    PartnerSupported

You can add –dry-run to the following to determine what work will be done, before you actually start the update, always a good practice.

[[email protected]:~] esxcli software profile update -d /vmfs/volumes/ContentLibraryDS/contentlib-0fe04e0c-1c9f-4d51-b35d-90e26255d36a/10a1a14f
4.zip -p Dell-ESXi-6.0U2-3620759-A00

Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: ...
   VIBs Removed: ...
   VIBs Skipped: ...

Most often you will have to reboot the ESXi host.

[[email protected]:~] reboot
Sep 9th, 2016 • Posted in ESXi, VMware
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>