[Updated] How to update your (free / whitebox) ESXi server to ESXi 5.1

Now that vSphere 5.1 (incl. ESXi 5.1) has been released one of the most frequently asked questions of home users is: How can I update my existing ESXi 5.0 installation without too much effort and without taking any risk? Here is a step-by-step procedure:

  1. Download the ESXi 5.1 Offline Bundle (a file named VMware-ESXi-5.1.0-799733-depot.zip) - You need a MyVMware account for this (register for free if you do not yet have one). If you are not authorized to download the bundle you may need to register for an evaluation of vSphere 5.1 first.
  2. Upload the bundle to a datastore of your host using the vSphere Client.
  3. Enable SSH on the host and log in.
  4. Now run one of the following commands to update your system:
    esxcli software profile install -d /vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip -p ESXi-5.1.0-799733-standard
       - or -
    esxcli software profile update -d /vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip -p ESXi-5.1.0-799733-standard
    (Adjust the path to the zip file to fit your datastore name) The install command will install ESXi 5.1 on your system while replacing or removing all existing packages, so it is like a fresh install with you current configuration. The update command will install all ESXi 5.1 packages replacing older versions of the packages, but will keep all packages that are not included in ESXi 5.1. If you originally installed your server with the VMware vanilla ESXi 5.0 ISO then there will be no difference between the both. However, if you have added e.g. a community supported (whitebox) hardware driver that was not originally supplied by VMware then you will want to use the update command to preserve this package!
  5. Reboot the server, and you are done!
Some good news about the update:
  • About Community supported device drivers: It looks like hardware drivers that were compiled for ESXi 5.0 are binary compatible with ESXi 5.1 and can still be used after the update. At least you are able to load them - I cannot really test if they still work the same way, because I do not use any whitebox hardware, but time will tell ...
  • So far I haven't found any obvious bugs in ESXi 5.1. The VM Autostart feature (that was broken in ESXi 5.0 Update 1) is still working ...
  • If you find that something is broken after your update you can easily roll back your system to ESXi 5.0 by pressing Shift+R at the boot loader screen.

Update (2012-09-14): Here are one minor post upgrade issue and two important tasks to do:
  • When powering on your VMs for the first time after the host upgrade you may get messages like "This Virtual Machine might have been moved or copied". This happens because the UUID of the host has been changed by the upgrade, thus also causing a change of all VM's UUIDs. It is safe to answer "I moved it." here which will keep the old UUID. For details see KB1541 (Thanks to James Hussiere for pointing this out in the comments!).
  • If you find that your system is running stable and there will be no need to roll back to ESXi 5.0 then you should upgrade the virtual hardware of your VMs (see KB1010675) and update the VMware Tools installed inside the Guest OSs.

Update (2012-09-17): It looks like many people have difficulties downloading the ESXi 5.1 Offline bundle like I described above. I cannot really understand why VMware makes this so difficult ... However, here is another method to create this file yourself:
  1. Download and install the VMware PowerCLI.
  2. Download my ESXi-Customizer-PS script (current version is 1.4) from here.
  3. Start a PowerCLI session using the shortcut that the PowerCLI installation created on your desktop.
  4. Change to the directory where you downloaded my script to and run it like this:
      .\ESXi-Customizer-PS-v1.4.ps1 -ozip
This will create the Offline bundle in the same directory:

Creating the ESXi 5.1 Offline bundle with the ESXi-Customizer-PS script

Update (2012-09-17): Now that the ESXi 5.1 GA ImageProfile is available in the VMware Online Depot there is an even easier way to update your ESXi 5.0 host: Instead of using the Offline bundle you can directly connect to the Online Depot and pull the ImageProfile and associated packages from there. You need to open a port on the firewall though to allow outgoing http requests. The following esxcli commands will do the job:


# open firewall for outgoing http requests:
esxcli network firewall ruleset set -e true -r httpClient

# install the ImageProfile from the Online Depot:
esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard

# OR: update the ImageProfile from the Online Depot (see remarks at the 
beginning of the post for the difference between install and update)
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard

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

41 comments:

  1. THANK YOU VERY MUCH, it works perfect!
    I just update a DELL R720 from 5.0 to 5.1.

    ReplyDelete
  2. This worked perfectly! THANK YOU! Well, two elements, but likely user error. ;-)

    1) The ZIP file was unavailable for me even after signing up for a VMware account and accepting the 5.1 trial. Switching to another browser and using a Google search for the file (still on VMware's site) seemed to do the trick.

    2) I turned off each of my VMs before the upgrade... and when the box came back to life after the update, I had to use vSphere Client 5.1 to tell the system that I had "moved" or "copied" each of the VMs. (Just select "copied." That worked for me.)

    Other than these, again possibly user error items, this cheat sheet rocks! THANK YOU!!!!

    ReplyDelete
    Replies
    1. Thanks Jim,

      these are no "user errors":

      1) There are some incomprehensible issues when using the VMware download pages (probably causes by the introduction of the MyVMware portal). Not your fault.
      2) I also encountered this on one of my hosts. Have updated my post to include more information.

      Delete
  3. Hi,

    I have the free version and I can't download the zip: "You are not entitled to download this product. VMware ESXi 5.1.0 Installable". Do you have any solution ?

    Thanks

    ReplyDelete
    Replies
    1. Tried to register an evaluation but still the offline bundle is unavailable. only the installable ISO

      Delete
  4. This is true.. We are unable to download the install bundle.zip even after registering for evaluation.. Only .ISO is available for evaluation

    ReplyDelete
    Replies
    1. I don't know why VMware makes this so difficult. However, I have updated my post with alternate instructions on how to create the Offline bundle yourself!

      Delete
  5. I had to perform the manual creation of the offline bundle using your script. After I transferred the file that was created (ESXi-5.1.0-799733-standard.zip) to the datastore (datastore1). I enabled SSH on the host in vSphere client. Placed the host into maintenance mode. Connected using an SSH client and logged in successfully. I pasted the update command into the ssh client and hit enter.

    I get:

    ~ # esxcli software profile update -d /vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip -p ESXi-5.1.0-799733-standard
    [MetadataDownloadError]
    Could not download from depot at zip:/vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip?index.xml, skipping (('zip:/vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip?index.xml', '', "Error extracting index.xml from /vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip: [Errno 2] No such file or directory: '/vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip'"))
    url = zip:/vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip?index.xml
    Please refer to the log file for more details.

    I am not sure where to go from here. Does anyone know what the issue is? Thanks.

    ReplyDelete
    Replies
    1. Are you sure that the datastore that you uploaded the bundle to is named "datastore1"? The file doesn't seem to exist in /vmfs/volumes/datastore1, so it's probably somewhere else.

      Delete
  6. My datastore is called datastore1. Maybe it isn't in the /vmfs/volumes directory?

    The file I uploaded to the datastore is ESXi-5.1.0-799733-standard.zip and I can see it in the root of datastore1. This is the file that was created when I ran your script from the PowerCLI.

    Should I rename it from standard to depot?

    ReplyDelete
  7. Of course the file should have exactly the name that you use after -d. So either rename the file or change the command accordingly ...

    ReplyDelete
  8. I renamed the file and got the same error. Maybe it is the offline file method that is causing problems?

    I patched this server a couple months ago with all the latest releases at that time, so I have some experience with this...

    Will this method also work on a non-free version of ESXi? I am thinking of pulling the trigger on the essentials kit.

    ReplyDelete
    Replies
    1. Yes, this method works with any edition of ESXi 5.0. I also just updated the post to provide an even easier method without needing the Offline Bundle.

      Delete
    2. Thanks. I am trying it out now.

      Delete
  9. Thank you for your help. I was able to upgrade this way. I think that the problem was stemming from an incorrect DFG for the vmkernal. After I realized that I could not get out to the online depot, I corrected the DFG for the VMKernal and was able to pull the update and installed successfully.

    ReplyDelete
  10. Thank you! Good and useful piece of advice!

    ReplyDelete
  11. I am trying to install a FRESH esxi 5.1 in a whitebox that has a AR8151 NIC. Since 5.0 is no longer available is there a way in "inject" the vib I needed in to the 5.1 ISO from your ESXi Customizer?

    ReplyDelete
    Replies
    1. Yes, ESXi-Customizer also works with ESXi 5.1, and VIBs that were made for ESXi 5.0 should also work with ESXi 5.1. Just try it, and if you run into problems then follow the Troubleshooting section.

      Delete
  12. Huge thanks for the ESXi-Customizer-PS script.

    ReplyDelete
  13. Thanks for info,

    Аnd if somebody like me have this:

    [MetadataDownloadError]
    Could not download from depot at zip:/vmfs/volumes/datastore1/VMware-ESXi-5.1.0-799733-depot.zip?index.xml....

    Its bad bundle .zip, go to vmware and redownload them.

    ReplyDelete
    Replies
    1. I had to upload the .zip file using SSH instead of datastore browser in order to get this to work.

      Delete
  14. why not just throw the disk in and choose the very easy upgrade process there?

    ReplyDelete
  15. I upgraded but used the cd /dvd to run the upgrade.
    All went smooth, no issues.
    However,when I connect with my vsphere client, I get fuzzy looking windows inside the vsphere client, which slowly updates to a normal/sharp screen. Hard to describe. Almost seems like a video driver issue ?
    Didn't do it before the update. Also seems slow and sluggish. Before it was nice and fast.

    ReplyDelete
    Replies
    1. Thanks Andreas,
      I tired that but no difference.
      It even happens on a linux/text window...

      Delete
  16. Better solution for "Update (2012-09-14)":
    Between step 3 and 4 you must choose enter in "Enter Maintenance mode" (Right click on the host node)

    ReplyDelete
  17. Can I use the last patch bundle to update esxi 5.0 to 5.1?
    e.g.
    I have esxi 5.0.0, 821926, can I run the following command?
    esxcli software profile update -d /vmfs/volumes/datastore1/ESXi510-201212001.zip -p ESXi-5.1.0-20121204001-

    ReplyDelete
    Replies
    1. I had an issue when using CD to upgrade from 5.0 to 5.1, it was a network issue, possible nic drivers. Will this proceduere work around the issue? I rolled back to 5.0 and all is happy, but I need to get to 5.1

      Delete
    2. @pwkelly, if you have added a custom driver to ESXi 5.0 to make your NIC work, then the " esxcli software profile update" command will preserve this driver. If you have not done this then you probably use a Realtek NIC/driver which supports less NICs after upgrading to the ESXi 5.1 version than before with 5.0. I do not really have a solution for this issue.

      Delete
    3. Thank you , not what wnted to hear, I did not put special nic drivers in for 5.0. Is there any way to use the 5.0 drivers in 5.1. I have no idea where to find them, if it is possible. and would probably need some directions on the how to apply

      Delete
  18. Will there be in a difference if you update to update5.1U1 when using
    esxcli software profile update
    or
    esxcli software vib update

    ??
    I am using a local copy of the zip file with the update.
    I've used the profile command in the past and it took a long time to update. This weekend I used the vib command and it updated really quick.

    Thanks

    ReplyDelete
    Replies
    1. "esxcli software vib update" will only update already existing VIB packages.
      "esxcli software profile update" will also add packages that might be new in the patch bundle (i.e. currently not installed on the system).

      ESXi 5.1 U1 does not include any new VIBs, so the result will be the same this time. However, this might change with newer updates.

      I'm not sure why the "profile" command takes longer. It probably does some additional checks for what is currently installed and what s in the patch bundle.

      More info on the update to 5.1U1 is here: http://www.v-front.de/2013/05/quickest-way-to-update-your-standalone.html

      Delete
    2. Thanks Andreas. I will check it out.
      I also did the vib update on the previous patch before U1 so I might have to rerun it. That won't hurt anything will it ?

      One annoying thing I noticed that I had before, went away after a patch and now returned is the delayed screen updates in vsphere client when looking at console.

      Delete
  19. Hi Andreas,

    does this description also fit to an Update-Process from ESXi 4.1.0 to 5.1.0?

    Bert

    ReplyDelete
  20. I have installed HP esxi image. can i use this method to upgrade to esxi 5.1 or i need to use hp's modified bundle ?

    thanks,
    Tadas

    ReplyDelete
    Replies
    1. You can use the "esxcli software profile update" method. If you use it with the standard VMware bundle then you will keep the existing HP bundles and drivers.
      However, it is better to use the update method with the HP customized zip bundle, because that will also update the HP software and drivers. Go to http://equi.ps/hp for the download.

      Delete
    2. Thank you for download link. I have saved zip image on my computer. Now i need just to upload to my esxi server and run this command:
      esxcli software vib install -d

      is that correct ?

      Thanks,
      Tadas

      Delete
  21. Everyone who have hp Gen8 server with custon HP esxi image. read this:
    http://www.wooditwork.com/2010/08/09/flex-10-esx-pre-requisites/

    you also might need to upgrade Emulex firmware.

    ReplyDelete
  22. I've downloaded your script, and created an offline bundle for 5.1. However, where I am only want me to take the server to 5.1U1Patch5 - and the offline depot seems to take all vibs to the latest. Is there any way I can restrict it?

    ReplyDelete
    Replies
    1. Hi Debbie,
      use the -sip switch (together with -v51). This will present you a list of all available ESXi 5.1 patch levels and let you select the right one from it.
      Andreas

      Delete
  23. Hi Andreas
    I have to update from Esxi 5.0 to 5.1. But as noted in multiple posts above, I am unable to download an iso image for the upgrade. If you can please post your most current and easiest way [Step by Step] for a newbie to upgrade "in place" from Esxi 5.0 to Esxi 5.1, will really appreciate it . Thanks.

    ReplyDelete

***** All comments will be moderated! *****
- Please post only comments or questions that are related to this post's contents!
- Advertising and link spamming will not be tolerated!