Home > VMware vSphere > One way to update a vSphere 5 host from CLI

One way to update a vSphere 5 host from CLI


Every time a new version comes out, I have to dig up this procedure, so I figured I’d post it for quicker reference next time.

If you have a vSphere Update Manager in your environment, use it, if not, here is one method to update a host: (using ESXi-5.0.0-20120302001-standard.zip in this case)

  1. Locate the Offline Bundle with the desired version or create an image profile from it that includes additional vibs you may need.
  2. Copy that zip file to a datastore that the host to be upgraded has access to.
  3. Use the vSphere CLI on a local machine and vMA to run this command to determine the profiles contained in the bundle

    esxcli --server=<host IP> --username=root --password=<password> software sources profile list --depot="[DATASTORE]ESXi-5.0.0-20120302001-standard.zip"

    Returns “ESXi-5.0.0-20120302001-standard”, “ESXi-5.0.0-20120302001-no-tools”; we’re going to use “standard” in this case.

  4. Put the host in maintenance mode

    vicfg-hostops.pl --server=<host IP> --username=root --password=<password> --operation enter

  5. Apply update to host using profile

    esxcli --server=<host IP> --username=root --password=<password>software profile update --depot="[DATASTORE] update-from-esxi5.0-5.0_update01.zip" --profile="ESXi-5.0.0-20120302001-standard"

  6. Reboot the host

    vicfg-hostops.pl --server=<host IP> --username=root --password=<password> --operation reboot

  1. 07/12/2012 at 10:23 am


    What is the difference between ‘ESXi-5.0.0-20120302001-standard’ and ‘ESXi-5.0.0-20120302001-no-tools’??


  2. 07/12/2012 at 10:41 am

    the “no-tools” profile does not include the VMware tools, making it smaller (and faster to load from auto-deploy). If you choose this option, you’ll not be able to install VMware Tools in VMs on this host. The work-around is to configure a Shared VMware Tools repository as described here:

  3. 07/13/2012 at 5:22 pm

    Thanks for the clarification 🙂

  1. No trackbacks yet.
Comments are closed.
%d bloggers like this: