To update to the latest version of vSphere, VMware presents in the Download area packages to use with vCenter Update Manager or vihostupdate to upgrade from ESXi 4.0 or ESXi 3.5.
I had the intention to update my current ESXi 4.1 hosts with the vihostupdate utility and was wondering how to determine the content of a package called: update-from-esxi4.1-4.1_update01.zip. The answer is in the vSphere Command-Line Interface Installation and Scripting Guide. For my own convenience, I have logged the whole process in this post.
IMPORTANT: In case you run another version of ESXi, you have to download one of the other packages, the steps are similar.
Note: vihostupdate performs the actions on one host at a time and you have to provide connection info with each command. In this example, the hostname is ml110g6.
Before you start, the host must be in maintenance mode before you can install patches. You can check with this command.
C:\>vicfg-hostops.pl --server ml110g6 -operation info
Enter username: root Enter password:
Host Name : ml110g6.virtual.local Manufacturer : HP Model : ProLiant ML110 G6 Processor Type : Intel(R) Xeon(R) CPU X3430 @ 2.40GHz CPU Cores : 4 CPUs x 2393 GHz Memory Capacity : 12278.96875 MB VMotion Enabled : no In Maintenance Mode : yes Last Boot Time : 2011-02-12T10:54:20.84378Z
What is installed on the host at this time?
C:\>vihostupdate.pl --server ml110g6 --query
Enter username: root Enter password:
---------Bulletin ID--------- -----Installed----- ---------------- ESXi410-201010402-BG 2010-11-21T17:16:38 Updates VMware Tools ESXi410-201011401-BG 2010-12-19T17:06:23 Updates Firmware
With the next command comes the answer on my initial question, what is in the new package? It is curious that you have to specify connection info for this. So in this bundle are 5 bulletins, the last one “ESXi410-Update01” is the one we need.
C:\>vihostupdate.pl --server ml110g6 --list --bundle c:\Temp\update-from-esxi4.1-4.1_update01.zip
Enter username: root Enter password: ---------Bulletin ID--------- ----------------Summary--------------- ESXi410-201101201-SG Updates the ESXi 4.1 firmware ESXi410-201101202-UG Updates the ESXi 4.1 VMware Tools ESXi410-201101223-UG 3w-9xxx: scsi driver for VMware ESXi ESXi410-201101224-UG vxge: net driver for VMware ESXi ESXi410-Update01 VMware ESXi 4.1 Complete Update 1
An extra command to see what is applicable for this host?
C:\>vihostupdate.pl --server ml110g6 --scan --bundle c:\Temp\update-from-esxi4.1-4.1_update01.zip
Enter username: root Enter password: The bulletins which apply to but are not yet installed on this ESX host are listed.
---------Bulletin ID--------- ----------------Summary--------------- ESXi410-201101201-SG Updates the ESXi 4.1 firmware ESXi410-201101202-UG Updates the ESXi 4.1 VMware Tools ESXi410-201101223-UG 3w-9xxx: scsi driver for VMware ESXi ESXi410-201101224-UG vxge: net driver for VMware ESXi ESXi410-Update01 VMware ESXi 4.1 Complete Update 1
This is the actual command to install the update.
C:\>vihostupdate.pl --server ml110g6 --install --bundle c:\Temp\update-from-esxi4.1-4.1_update01.zip --bulletin ESXi410-Update01
Enter username: root Enter password: Please wait patch installation is in progress ... The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Before we reboot the host, check your work
C:\>vihostupdate.pl --server ml110g6 --query
Enter username: root Enter password:
---------Bulletin ID--------- -----Installed--------------- ESXi410-Update01 2011-02-13T09:18:26 VMware ESXi 4.1 Complete Update 1
Now reboot the host!
More info on this subject in the vSphere Command-Line Interface Installation and Scripting Guide and general information about updating and upgrading in this post. Enjoy reading.
Thanks for this post it was exactly the info I needed!
Perfect instructions. Made what started out and adventure quite easy. Thank you
Hello Dan,
Thanks for the feedback. I’m glad you liked this post.
Regards,
Paul
Thanks Paul a good procedure to upgrade from ESXi 4.1 to Update 1 without a configured Update Manager.
Excellent post – very well documented. I did a fresh install of ESXi 4.1 on an HP DL380 G5 server today using the HP customized ESXi installer. Then I used your steps to apply Update 1. The only thing I would add is that you will get prompted to update the VSphere client software after installing Update 1.
Thank you very much for your feedback. You are correct, after upgrading ESX or ESXi you have to update the vSphere Client. The same goes for the VMware Tools (At this moment I’m investigating how-to bulk update VMware Tools…) and vCenter. In fact, in my home lab, I started by upgrading vCenter and VMware Upgrade Manager (VUM) to 4.1 Update 1. Usually I prefer VUM for updating ESX and ESXi, but in this case I was curious using vihostupdate and the update packages.
Kind Regards,
Paul
Do not copy paste above command prompt, instead write it manually ( otherwise you can get an error message saying ” error connecting to server at ‘https localhost sdk webservice’ perhaps host is not a vCenter or ESX server ” ). This is typical perl behaviour 🙂
Great thanks for the clear explanations, if only vmware did this 🙂
Hello Jason,
Thank you very much for your reply, I really appreciate this. 🙂
Regards,
Paul
First of all, I want to thank you for this great guide.
But i have a little Problem:
after every command, after showing the host info, I get the answer:
Error encountered:
Description – Unable to parse VIB database: no element found: line 1, column
0
Message – The format of the database is invalid.Unable to parse VIB datab
ase: no element found: line 1, column 0
any idea how to fix it?
Hello Alex,
Thanks for your feedback.
Did you check this thread: http://communities.vmware.com/thread/298646
BTW, the link in the last post has been written in Spanish. I have used Google Translate.
Regards,
Paul
Excellent post. Now why can’t vmware have a quick and easy write up like this ???
Why didn’t you install all the fixes that were in the file ? Or are they all included in the last bulletin ?
Hello Ren,
Thank you for the feedback
Everything is included in the last bulletin. There is also a KB about this, although it does not explain very much imho. See: http://bit.ly/eoPrsI
Regards, Paul
Awesome! I spend the last two days trying whatever solutions (ok, have to admit I am Political Scientist 😉
Took me some time to find out the difference between Esx, Esxi and free Esxi. And that there is a shift from Esx to Esxi. And that the nice Update tool is not available anymore.
Found some other “How Tos” but your ones is far the best!
Happy Easter
Otto
Hello Otto,
Thanks for the feedback and have fun with VMware. Indeed it is wise to use ESXi instead of the classic ESX. There is a lot of good reading on this subject.
Regards,
Paul
Nicely written procedure, thank you.
Maybe one little tip is to give an indication of the time this update will take.
It’s depends on the setup I know, but maybe for a slow and a fast solution.
Mine is taking more than five minutes now and no indication of what’s happening at all.
This is usually the moment that I start pressing Ctrl-C 😉 but I’ll wait some more.
I think it took about 10 minutes before the first response came, but all worked just fine.
//niels
Hello Niels,
A bit late, but thanks for your feedback.
Today, I performed an upgrade as described in this post. As on other occasions it usually takes about two minutes. If you also connect to the host with the vSphere Client, you can watch the progress in the Task window.
Regards,
Paul
Excellent post, this is just what I was looking for! I want to update my Esxi servers from 3.5 to 4.1 Update 1 (upgrade-from-ESXi3.5-to-4.1_update01.348481.zip)
If I try to see what’s in the package I get this error: “This operation is NOT supported on 3.5.0 platform”
So, do you know if must I apply the whole package without the –bulletin parameter?
Thanks!
Hello Alberto,
Thanks for your feedback. IMHO updating and upgrading ESX(i) servers is a complex subject. Last year,
I did some research, the result is this post: https://paulgrevink.wordpress.com/2010/12/12/vmware-keep-your-environment-up-to-date/
In this post, I wrote that it is possible to upgrade an ESXi 3.5 host to ESXi 4.1 U1. Well it seems that
I was wrong. This Release notes http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_u1_rel_notes.html (Section: Supported Upgrade Paths for Host Upgrade to ESXi 4.1 Update 1) states
that the upgrade-from-ESXi3.5-to-4.1_update01.348481.ZIP can only be used with the VMware vCenter Update Manager.
Are there alternatives?
One possibility is to reinstall the ESXi host. In that scenario, you will have to reconfigure your ESXi host and
take care of your local VMFS. You will need the ISO file.
You can also consider a two step upgrade. It should be possible to upgrade from ESXi 3.5 to ESXi 4.0, using the
vSphere Host Update Utilty. From there you can upgrade to ESX4.1 U1 using the vihostupdate.
Scenario three is the VMware vCenter Update Manager, if you have a vCenter Server.
I hope this helps, let me know if you need additional information.
Best regards
Thank you very much for this info! The ESXi servers are in production, perhaps the fastest way is a two steps upgrade at weekend, and avoid reconfigure the ESXi servers and copy the VM out of the raid (I don’t know why, but the management network is very slow). I will report the results.
Best regards
Yes, I’ve updated the first ESXi (HP DL360 G5) with success! two step upgrade, first vSphere Host Update Utility (3.5->4.0) and last vihostupdate (4.0 to 4.1). Thank you very much.
Best regards.
very helpful post, thank you.
Beginners like me may like to note that you need to make sure you have build 4.1 of vCLI or you’ll get the an error message ‘This operation is NOT supported on 4.1.0 platform’
Also do you have details on how to complete the other steps from the vCLI, shutdown VMs, enter host maintenance mode, then restart at the end?
Thanks for your feedback.
Good point, indeed it is a good idea to install an actual version of the VMware vSphere CLI, otherwise it could lead to unpredictable results.
You can do almost anything from the command line.
A few examples, using the VMware vSphere CLI
Put host in maintenance mode:
C:..>vicfg-hostops.pl –server hostname –username root –operation enter
To exit from maintenance mode:
Put host in maintenance mode
C:..>vicfg-hostops.pl –server hostname –username root –operation exit
To reboot a host:
Put host in maintenance mode
C:..>vicfg-hostops.pl –server hostname –username root –operation reboot
Type this command to see all available ptions:
C:..>vicfg-hostops.pl –help
To shutdown VMs and perform other operations, there is a vmware-cmd.pl available. I do not consider this command very user friendly.
However, VMware has another very nice tool available, the vSphere PowerCLI, a set of Microsoft PowerShell Cmdlets.
These Cmdlets offer great possibilities, I advise to invest some time into the PowerCLI.
For example, with one line of PowerCLI, you can power down all VMs on a host. That sounds great?
I hope this answer was helpfull, please feel free to respond.
Regards,
Paul
Thanks
Another got ya for beginners (that I have found) is unfortunately ESXi free has read only vCLI from Windows.
Displaying or listing VM and host details is good but if you try any action (e.g. stop/reset/suspend) on the guest or enter maintenance mode on the host you’ll fail with
Operation cannot be performed:
SOAP Fault:
———–
Fault string: fault.RestrictedVersion.summary
Fault detail: RestrictedVersionFault
This is really going to cause problems with my HP and APC UPS graceful shutdown I think. Will maybe have to try something like James has put together here > http://www.techhead.co.uk/how-to-automatically-shut-down-vmware-esxi-gracefully-during-power-failure-using-an-apc-ups#comment-12852
Do you know if there is a similar restriction with the PowerCLI commands on ESXi free? Also how do you know of any step by step to activate PowerCLI and run from windows?
ESXi free, official name “vSphere Hypervizor” has a few limitations:
– Remote command-line (vCLI) appliance, the vCLI and the vSphere PowerCLI and SDK for Perl, are all limited to read-only access
– SNMP monitoring is not supported
– VMware Consolidated Backup (VCB) and Data Recovery tool are also not supported
VMware states that the vSphere Hypervizor helps you to familiarize yourself with ESXi…and expect you to buy a licensed edition in the future.
Although I have installed ESXi free for several customers (usually a single host), created a few VMs and do management with the vSphere Client.
To start with the vSphere PowerCLI, a good introduction is: http://www.vmware.com/support/developer/PowerCLI/index.html
Here you will find the software and documentation.
To get started with Powershell, this is a good starting point:
Don Jones is a well known PowerShell expert.
When you have a desktop with Windows 7, you are ready to start. In case you have XP, first download PowerShell from Microsoft.
I tries all methods, but finally this method worked for me. Read the instructions carefully.
http://stevehardie.com/2011/07/how-to-upgrade-esxi4-0-to-esxi4-1-update-1/
Thank you so much for sharing this! I updated my ESXi 4.1 (free version) to 4.1 Update 1 by following your instructions. They worked like a charm!
Before this I was digging through VMware documentation on how to install the update-from-esxi4.1-4.1_update01.zip update but their docs were incorrect as they mentioned some nonexistent bundle:
vihostupdate –server host name or IP address -i -b location of the ESXi upgrade ZIP bundle – B ESXi410-GA-esxupdate
Thanks for the explaining the steps on how to get the bundle names, that should make future updates go smoother for me!
thanks for this post.
Very helpfull !
The vmware documentation pages really suc….
Hallo Christian,
I guess the instructions will also work installing the latest U2 update, with a few modifications.
Regards,
Paul