Neat way of installing or updating any VIB using just the ESXi


Neat way of installing or updating any VIB using just the ESXi Embedded Host Client

couple of months back I had tossed out an idea on Twitter asking if
others would like to see an automatic update mechanism built into the
ESXi Embedded Host Client which would allow users to easily update to
newer releases of the Fling versus the current method which
requires copying the VIB and then running command in the ESXi Shell.

To no surprise, the feedback was an astounding yes! Literally within a couple of hours, Etienne Le Sueur,
one of the two VMware Engineers working on the Fling shared a
screenshot that demonstrated that this would possible. The first release
of this feature would simply ask for the URL to the updated ESXi
Embedded Host Client VIB and this was included in the v3 release of the Fling.

One additional tidbit that Etienne had shared was that the way this
feature was implemented, it was not only limited to Embedded Host Client
VIB but you could do this for any ESXi VIB. This is done by using the vSphere API and calling into the InstallHostPatchV2_Task()
method which allows you to install or update an ESXi VIB from a URL
source. Most recently, there a twitter conversation between myself,
Etienne and Christian Mohn
on how this capability could be further extended to include updating
ESXi itself which can either be from an Image Profile or offline bundle.
For those with a detailed eye, you may have noticed that the same API
method can also support an offline bundle URL which would make this
possible. As of right now, the feature is actually included in an
internal build of the Embedded Host Client, but perhaps we will see this
in a future update of the Embedded Host Client? 😉

Going back to the original topic of this blog post, to use the VIB
install/update mechanism, you would need to first upload the ESXi VIB to
an HTTP Server and then specify the URL. This is fine if you have an
existing HTTP Server but if you do not, it is sort of a pain and though
there are other methods like uploading directly to the ESXi’s python
based HTTP Server as mentioned
by Christian, it would still require using something like SCP which is
an additional step. My initial goal and hope was to be able to install
or update an ESXi VIB or ESXi itself using purely the Embedded Host
Client. This would keep things simple and not require things like SSH to
be enabled on the ESXi host.

After a bit of brainstorming with Etienne, he actually found a super
clever way of accomplishing this after our conversation. The idea I had
was to make use of the ESXi Datastore to store the VIB which can be
uploaded through the Embedded Host Client. By default, there is also an HTTP based interface
to the datastore, however it requires authentication which would be a
problem. The neat idea that was suggested was why not try to specify the
local VMFS path to the ESXi VIB (e.g./vmfs/volumes/datastore1/my.vib)?
It turns out that this actually works as well!

With just two easy steps, you can now upload an ESXi VIB and
then install/update all using just the Embedded Host Client with no
additional dependencies

Step 1 – Navigate to the Datastore section in the
Embedded Host Client and then upload the ESXi VIB that you wish to
install or update.

Step 2 – To install/update the VIB, click on Help in the upper right hand corner of the Embedded Host Client and select the “Update” option. Specify the local VMFS path to ESXi VIB and then click on Update to apply.

Note: A reboot
may be required after applying a new VIB. It will be your responsibility
to shutdown the VMs and reboot the ESXi host for changes to go into
effect if required.

At this point, you should also see a task kicked off applying the VIB.
If there are any errors thrown, they will be displayed else you should
see a successful task completion. For educational purposes, here is a
quick screenshot of /var/log/esxupdate.log showing the VIB being applied, this can be used for further troubleshooting if required.

Hope you enjoyed this neat little trick and with just two easy steps
you can install or update any ESXi VIB using the Embedded Host Client
without additional dependencies or enabling SSH on the ESXi host.