I recently came across an interesting article by Andreas Peetz which shows you how to patch an ESXi host using an image profile that is directly available on VMware's online depot within the ESXi shell. I knew that VMware had online depots for use with VUM and Auto Deploy but I was not aware of this particular method, especially directly from the host.

Disclaimer: This method assumes you can install the default ESXi Image Profile with no additional drivers or packages, else you may have connectivity issue after the upgrade. If you still need to customize the ESXi Image Profile before installation, you will still need to use something like Image Builder and then upload that to your online depot.

Note: There are many ways that you can patch/upgrade your ESXi hosts, here is another article that provides more details for command-line only methods.

Before you get started, you will need to make sure that your ESXi host has the httpClient firewall rule enabled, else you will not be able to connect to VMware's online depot. To enable this, run the following ESXCLI command:

esxcli network firewall ruleset set -e true -r httpClient

Also make sure that your ESXi host can reach the following URL (you can specify a proxy if needed):

https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

To view the available ESXi Image Profiles, run the following ESXCLI command (use the --proxy if you need to specify a proxy to reach VMware's online depot):

esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

If you are able to successfully connect to the online depot, you see a list of all the ESXi Image Profiles that are available to you. You will see two ESXi 5.1 Image Profiles (these were recently published), one with VMware Tools and one without VMware Tools.

Note: Before you begin, make sure you do not have any running VMs and put your host into maintenance mode.

Let's go ahead and upgrade our ESXi 5.0 Update 1 host to latest ESXi 5.1. To install the new Image Profile, run the following command:

esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard

This can take a few minutes to complete depending on how fast you can pull down the Image Profile. Once it is done, you will see all the new VIBs that have been updated and you will be asked to reboot for the changes to go into effect and then you will be running ESXi 5.1! Pretty cool IMO!

29 thoughts on “A Pretty Cool Method of Upgrading to ESXi 5.1

  1. Hello, william!
    i´m using ESXi5 (free version of VMware vSphere Hypervisor 5 on a Acer AC100 with 16Gig RAM) and try to update my existing server. The standard method using

    esxcli software vib update –depot /vmfs/volumes/4f2aad46-***/ESXi500-201207001.zip

    finished with the errors: “VIB “. cannot be removed live”

    ESXi is running in maintenence mode.

    Glad to see your blog with another method to upgrade, I got the same errors.

    Do you have any suggestions, how to continue the update ?

    Chris
    Vienna

  2. I’m getting the “cannot remove live” that Anonymous got“ but its not the free edition“

  3. Great post!

    With Nexus 1000v

    ~ # esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard
    [Exception]
    You attempted to install an image profile which would have resulted in the removal of VIBs ['Cisco_bootbank_cisco-vem-v142-esx_4.2.1.1.5.1a.0-3.0.1']. If this is not what you intended, you may use the esxcli software profile update command to preserve the VIBs above. If this is what you intended, please use the --ok-to-remove option to explicitly allow the removal.
    Please refer to the log file for more details.
    ~ #

  4. I know this is an older posting (earlier this year) but it absolutely rocked and is not only a different way to upgrade but an awesome way to upgrade. Worked flawlessly on my ESXi box (SH67H3) after struggling with some other methods. It took a while“ but when it completed“ all was golden. Thanks again.

  5. This was my first shot at patching my first ESXi box and it was flawlessly! This is an all-in-one home NAS box, so I guess it’s the free version. Took about 1 minute after entering three lines:

    - Place ESXi into maintainence mode
    - run VMware vSphere CLI

    >>> esxcli -s network firewall ruleset set -e true -r httpClient
    >>> esxcli -s esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

    - find the latest patch in the list and copy the name (i.e. ESXi-5.1.0-20121201001s-standard)

    >>> esxcli -s software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-20121201001s-standard

    Thanks!

  6. No third party apps
    esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.0.0-20121202001-standard

    Clobber third party apps
    esxcli software profile install --ok-to-remove -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.0.0-20121202001-standard

    Don’t clobber third party apps
    esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.0.0-20121202001-standard

  7. Thanks for this post. Way easier then running around with media to our school sites running ESXi Free.
    I ran the following to install the latest 5.1 Update 1 release and it worked awesome. Took about 45 minutes for the updates to download install and reboot.
    Ran on Dell PowerEdge R620 running ESXi Free 5.0 Dell Customized ESXi installation.

    esxcli network firewall ruleset set -e true -r httpClient

    esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-20130504001-standard

    reboot

  8. This is a great way to update your ESXi.. Question is, how often does the depot get updated? Looking to update to 5.5 but only see 5.0/1 in the list.

  9. Upgraded ESXi 5.0 to ESXi 5.5

    esxcli network firewall ruleset set -e true -r httpClient
    ~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

    Name Vendor Acceptance Level
    -------------------------------- ------------ ----------------
    ESXi-5.5.0-1331820-no-tools VMware, Inc. PartnerSupported
    ESXi-5.5.0-20131204001-no-tools VMware, Inc. PartnerSupported
    ESXi-5.5.0-20131204001-standard VMware, Inc. PartnerSupported
    ESXi-5.5.0-1331820-standard VMware, Inc. PartnerSupported
    ESXi-5.5.0-20131201001s-no-tools VMware, Inc. PartnerSupported
    ~ #
    ~ # esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20131204001-standard

    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: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-atiixp_0.4.6-4vmw.550.0.0.1331820, VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-via_0.3.3-2vmw.550.0.0.1331820, VMware_bootbank_block-cciss_3.6.14-10vmw.550.0.0.1331820, VMware_bootbank_ehci-ehci-hcd_1.0-“

  10. This unfortunetly did not work for me, and no one else in google seems to be experiencing the same problem. All I can do is populate the list of available profiles, and the one that should be showing under Vsphere -> Summary -> Host Profile : is ESXi-5.5.0-1331820-standard, but instead it just says VERY FRUSTRATING!!

    ~ # esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-13318
    20-standard
    [InstallationError]
    The installation transaction failed.
    vibs = No ImageProfile found for live image
    Please refer to the log file for more details.

    ~ # esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-133182
    0-standard
    [InstallationError]
    No image profile is found on the host or image profile is empty. An image profile is required to install or remove VIBs. To install an image profile, use the esxcli image profile install command.
    Please refer to the log file for more details.
    ~ #

Thanks for the comment!