How to upgrade from ESXi 5.x to ESXi 6.0 via CLI
Abstract
The post explains how to upgrade from ESXi5.0/5.5 to ESXi 6.0U2 with new esxcli command “esxcli software update profile”.
1. Introduction
It’s finally here! VMware ESXi-6.0U2 released on March16th, 2016 and is available for download. With it comes many new features and of course bug fixes(Release Notes). Of all these new features,ESXi Embedded Host Client is included, this is a big deal, the arrival of HTML5 UI client that is used to connect to and manage single ESXi hosts. It can be used to perform administrative tasks to manage host resources, such as virtual machines, networking, and storage.
Once the upgrade is done and host rebooted,just point your browser to this URL:
You can get a web-based management console.
Figure1 VMware Host Client
2. esxi command to upgrade
Traditionally the command to upgrade ESXi host is:
#esxcli software vib update –d /vmfs/volumes/<your_volume>/VMware-ESXi-xxx-depot.zip
Or:
#esxcli software vib install –d /vmfs/volumes/<your_volume>/VMware-ESXi-xxx-depot.zip
VMware now recommends using “esxcli software update profile” command instead, for UPGRADES. As with this command you have a possibility to specify the image profile within the upgrade package.
The “esxcli software update profile” command allows to pick an image profile within the upgrade package (usually there is 4 of them), but adds a bit of complexity.
The software profile update command updates existing VIBS with the corresponding VIBs from the specified profile, but does not affect other VIBs installed on the target server. The software profile install command installs the VIBs present in the depot image profile, and removes any other VIBS installed on the target server.
3. how to upgrade
Before you begin, you'll first need to carefully review WilliamLam's warning:
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.
...and Andreas Peetzwarning:
Important note: Before doing this please check whether you rely on one of the NIC drivers (e.g. Realtek) that were blacklisted in ESXi 6.0. You then need to carry out an additional step before doing the upgrade - see my earlier post(section 2) for details.
Following example shows how to update standalone ESXi-5.5 to ESXi-6.0U2 server through three steps.
1) Download the file called " update-from-esxi6.0-6.0_update02.zip", upload this file to the datastore within ESXi host.
2) Put your system into maintenance mode,or ensure you've set your ESXi host to automatically gracefully shutdown all VMs upon host reboot
3) Login in to the ESXi host via SSH client, then enter commands as:
# esxcli software sources profile list -d /vmfs/volumes/<your_volume>/update-from-esxi6.0-6.0_update02.zip
Name Vendor Acceptance Level
----------------------------- ---------- ----------------
ESXi-6.0.0-20160301001s-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160302001-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160301001s-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160302001-no-tools VMware, Inc. PartnerSupported
# esxcli softwareprofile update -d /vmfs/volumes/datastore1/update-from-esxi6.0-6.0_update02.zip- p ESXi-6.0.0-20160302001-standard
Output messages would look like:
Update Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
......
4) Reboot your ESXi host. When the reboot is complete, you'll see for yourself that you now have the latest ESXi running.
4. Conclusion
Compared to traditional upgrade command, “esxcli software update profile” command is more reliable and efficient.