WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / A Pretty Cool Method of Upgrading to ESXi 5.1

A Pretty Cool Method of Upgrading to ESXi 5.1

09.18.2012 by William Lam // 40 Comments

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!

More from my site

  • How to clear the ARP cache in ESXi prior to vSphere 5.5
  • 2gbsparse Disk Format No Longer Working On ESXi 5.1
  • Automating ESXi 5.1 Kickstart Tips & Tricks
  • Disabling IPv6 via Command-Line For ESXi 5.1 (Without Automatic Host Reboot)
  • w00t! VMware Tools for Nested ESXi!
Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

Categories // Automation, ESXCLI, ESXi, vSphere, vSphere 5.5, vSphere 6.0, vSphere 6.5 Tags // esxcli, esxi5.1, firewall, image profile, upgrade, vSphere 5.1

Comments

  1. NiTRo says

    09/18/2012 at 10:40 pm

    I saw that on the release notes (https://www.vmware.com/support/vsphere5/doc/vsphere-esx-vcenter-server-51-release-notes.html#upgrading) and found that really cool too 🙂

    "You can upgrade and apply patches to ESXi 5.0.x hosts by using the esxcli command-line utility for ESXi to install ESXi 5.1 from a download depot on vmware.com or from a downloaded ZIP file of a depot that is prepared by a VMware partner."

    Reply
  2. David Barker says

    09/18/2012 at 11:18 pm

    I needed to add --ok-to-remove to my command line because the host had an older host profile to get the update going.

    Reply
  3. Anonymous says

    09/19/2012 at 1:24 am

    William you rock dude. Thanks for the cool post

    Reply
  4. Anonymous says

    09/22/2012 at 8:38 am

    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

    Reply
  5. NiTRo says

    09/30/2012 at 12:56 pm

    ESXi free edition is read-only through cli that's maybe why

    Reply
  6. Anonymous says

    10/03/2012 at 4:12 pm

    I'm getting the "cannot remove live" that Anonymous got... but its not the free edition...

    Reply
    • William says

      10/03/2012 at 5:15 pm

      @Anonymous,

      Can you try "--ok-to-remove" as noted by @David Barker?

      Reply
  7. Anonymous says

    10/07/2012 at 4:21 pm

    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.
    ~ #

    Reply
  8. sujith says

    12/04/2012 at 6:07 am

    Thank you 🙂 ... this helped alot !!!

    Reply
  9. J says

    12/29/2012 at 3:18 pm

    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.

    Reply
  10. Anonymous says

    01/14/2013 at 5:46 am

    TNX works like a champ 😀 save me a lot of time

    Reply
  11. Anonymous says

    01/17/2013 at 4:45 am

    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!

    Reply
  12. Anonymous says

    01/17/2013 at 4:49 am

    Sorry, try again:

    # esxcli -s (ip) network firewall ruleset set -e true -r httpClient
    # esxcli -s (ip) software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
    # esxcli -s (ip) software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-20121201001s-standard

    Reply
    • n/a says

      03/25/2014 at 9:34 pm

      Thanks, the list command was just what i needed!

      Reply
  13. Anonymous says

    01/28/2013 at 6:37 am

    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

    Reply
  14. Joe T. says

    02/10/2013 at 4:01 am

    Worked like a charm on my free edition whitebox build! A ton easier than burning an ISO.

    Reply
  15. blaz praper says

    04/30/2013 at 5:30 pm

    +1

    Reply
  16. Anonymous says

    05/17/2013 at 11:05 am

    Does the command applies to ESXi 5.1 Update 1?

    Reply
  17. Anonymous says

    05/20/2013 at 9:01 am

    So if I understand correct, you can update any build version of ESXi 5.0 directly to 5.1 U1?

    I have server running version ESXi 5.0 build 474610 and I can update it directly to ESXi 5.1 build 1065491 with one simple command sxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-20130402001-standard or I have to update it step by step, I mean build after build?

    Reply
  18. Anonymous says

    06/13/2013 at 3:19 pm

    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

    Reply
  19. Anonymous says

    08/30/2013 at 10:32 pm

    Excellent guide... has helped me out massively. Thank you immensely.

    Reply
  20. Anonymous says

    09/24/2013 at 7:00 pm

    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.

    Reply
    • Anonymous says

      09/24/2013 at 7:03 pm

      nm, I found it in the middle of the list

      Reply
  21. bartek z falent says

    01/27/2014 at 5:30 pm

    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-...

    Reply
  22. Jesse Stacey says

    08/26/2014 at 11:17 pm

    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.
    ~ #

    Reply
    • Jesse Stacey says

      08/26/2014 at 11:20 pm

      sorry typo there. Vsphere -> Summary -> Host Profile says Unknown - no profile defined.

      Reply
      • THP says

        07/13/2015 at 2:47 pm

        I have just seen this issue on 1 out of 23 host in a cluster I patched, this is about the only result I got from various web searches so I am assuming it is quite rare!

        Even querying the profile via esxcli gets a null response back.

        When I listed out the vibs it only had one vib installed even though the host boots fine.

        If anyone knows of a resolution here I'd be very interested, I do have a case with VM so if it comes back with anything other than 'just rebuild' I'll come back and update this.

        Reply
    • Ram says

      01/14/2015 at 10:35 am

      Jess , did you had any solution for this ?

      Reply
  23. Well Loaded says

    02/07/2015 at 9:04 pm

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

    does not produce any result dated 2015 despite the Jan and Feb patch releases. Has anything changed with the new year?

    Thanks

    Reply
    • lamw says

      02/08/2015 at 12:49 am

      Really? It works for me, I see couple of patches for 2015

      ESXi-5.5.0-20150104001-no-tools VMware, Inc. PartnerSupported
      ESXi-5.5.0-20150204001-standard VMware, Inc. PartnerSupported
      ESXi-5.5.0-20150101001s-no-tools VMware, Inc. PartnerSupported
      ESXi-5.5.0-20150204001-no-tools VMware, Inc. PartnerSupported
      ESXi-5.5.0-20150104001-standard VMware, Inc. PartnerSupported
      ESXi-5.5.0-20150101001s-standard VMware, Inc. PartnerSupported

      Reply
      • Well Loaded says

        02/08/2015 at 3:25 pm

        I swear they were not there last day (I had also used grep to avoid mistakes) and found nothing.
        However I can see them today!

        Thank you

        Reply
  24. misscloud says

    05/08/2015 at 7:56 pm

    hi

    when patch an esxi, i got after esxcli software profile update -d, Message: host not changed.
    Reboot Required: false
    that proof the vib exist already?

    Reply

Trackbacks

  1. Quick Tip – Listing Image Profiles From an ESXi Patch Using ESXCLI | virtuallyGhetto says:
    02/28/2014 at 9:02 pm

    […] A Pretty Cool Method of Upgrading to ESXi 5.1 […]

    Reply
  2. TinkerTry IT @ home | How to upgrade free Hypervisor ESXi 5.0 to 5.1, the easier way says:
    05/03/2014 at 2:52 am

    […] A Pretty Cool Method of Upgrading to ESXi 5.1, by William, September 18 2012 even simpler, esxcli command pulls the code down then applies it, reboot http://www.virtuallyghetto.com/2012/09/a-pretty-cool-method-of-upgrading-to.html?m=1 […]

    Reply
  3. ESXi 5.5 Patch Release ESXi550-201407001 | MAXIMUM! says:
    07/03/2014 at 10:42 am

    […] our ESXi host), I will not be able to update my whitebox using the online method as described here.  The patch resolves quite a few issues as described here. After your host has been successfully […]

    Reply
  4. Updating VMware on my Homelab | Breek een been! says:
    09/17/2014 at 8:18 pm

    […] everytime they release a new version I can probably use a different one. Normally I really like this online way described on virtualGhetto. Although this time I'm going to use a different way, cause my new […]

    Reply
  5. Nested ESXi 5.1 – Virtual ESXi In A Physical ESXi Host | Andrew Roderos says:
    09/10/2015 at 2:36 pm

    […] the VCP5-DCV exam. If you're interested in updating your ESXi 5.0 to 5.1, please follow this guide. Now, that guide doesn't update to 5.1 U1 so you may want to use this […]

    Reply
  6. Patch: Update ESXi 5 a 5.1 (eng) – JoseMCT says:
    06/26/2016 at 5:17 am

    […] to William Lam for pointing this out in this post. He also has provides more details e.g. for using an http proxy […]

    Reply
  7. How to upgrade from ESXi 5.x to ESXi 6.0 via CLI – YinqingWang's Blogs says:
    11/27/2016 at 7:18 pm

    […] Before you begin, you'll first need to carefully review William Lam's warning: […]

    Reply
  8. Intel NUC6 and ESXi Home Lab | Okopop - Ramblings about techy stuff says:
    12/17/2016 at 3:29 pm

    […] Use William Lams guide here: http://www.virtuallyghetto.com/2012/09/a-pretty-cool-method-of-upgrading-to.html […]

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Support

Recent

  • How to forcefully disconnect a vSphere VM Console session? 06/24/2022
  • Quick Tip - Using ESXi Scripted Installation (kickstart) to configure IPv6 networking 06/21/2022
  • Hiking Trails 06/04/2022
  • 2022 VMUG Advantage Community Group Buy 06/01/2022
  • Quick Tip - Enabling vCenter Events for NTP (Network Time Protocol) or PTP (Precision Time Protocol) operations 05/31/2022

Advertisment

Copyright WilliamLam.com © 2022