Today we'll learn some useful ESXi CLI commands plus we'll see a different way that we can upgrade a ESXi 5.5 upgrade to 6.0 – via online repository. Note you don't have to be paid customer for this, it works for ESXi Free version as well. It's necessary to open a firewall port on the ESXi and we'll see how to do it as well.
We have already learn to patch standalone ESXi hosts or hosts present in vSphere cluster via CLI or ESXi Installation ISO (interractive) or via vSphere update manager. For that we have used the Offline bundle file or the ESXi 6.0 installation ISO image.
Today we'll learn another way to upgrade ESXi host and also we'll learn few CLI commands that you might find useful as well. Those are always good to know when working with ESXi host and you need to do some basic troubleshooting, updating, patching, etc. Let's start with some easy commands.
Check the build number of the ESXi host
You'll get this as an output (if you're running the latest ESXi)
Easy, isn't it?
Open firewall port via CLI:
esxcli network firewall ruleset set -e true -r httpsClient
Again, easy. Note that you can do the same by selecting the host through vSphere client > configuration > security profile > Firewall
How to retrieve a image list from online depot and do an upgrade of ESXi host from previous release
This one is a bit longer and needs two steps…
Step1: Show available images and choose the one you want for your update
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | sort -r
This takes a while, and as a result it shows all images since vSphere 5.0 ….
Step 2: You can use the command for opening the Http web access (it's disabled by default) which we learned in tweak #2.
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml –profile=ESXi-6.0.0-20150504001-standard
The output is a bit big (I cut the most part..)
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_esx-base_6.0.0-0.6.2715440
VIBs Removed: VMware_bootbank_esx-base_6.0.0-0.0.2494585
VIBs Skipped: VMWARE_bootbank_mtip32xx-native_3.8.5-1vmw.600.0.0.2494585, VMware_bootbank_ata-pata-amd_0.3.10-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-atiixp_0.4.6-4vmw.600.0.0.2494585, VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.600.0.0.2494585, …..
Reboot is necessary…
The different ways to patch or upgrade VMware ESXi:
- Use ESXi Installation ISO image (for standalone hosts with CD-ROM drive)
- Use ESXi Offline bundle (for standalone, or hosts without vCenter)
- Use vSphere Update manager (for larger installation managed via vCenter)
- Use Internet and Online Repository (this post)
If you want to check more how-to articles, news, videos and tutorials for vSphere 6 you might want to check the vSphere 6 page. Share and enjoy..-:)
Josh Olszewski says
I was wondering if there was a similar offline upgrade with upgrading the vCenter Server itself from 5.5 to 6.0?? I upgraded a host successfully but now cannot manage since vCenter is not up to 6.0
Vladan SEGET says
2 options: 1. Launch an upgrade of vCenter 5.5 > 6.0…. 2. revert back ESXi 6.0 > 5.5 and THEN start the upgrade process with vCenter server, followed by ESXi hosts. (depends the size of the environment, if VUM is used etc…)
hmm should the link not be esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml –profile=ESXi-6.0.0-20150902001-standard ?
If you look at the date the article was written you will notice it was before the update you are referring to was released. So no, before June 2015 the latest update WAS ESXi-6.0.0-20150504001-standard.
It now IS ESXi-6.0.0-20160104001-standard as of 10/01/2016, so by your logic your comment is incorrect now, and now mine is correct?
Use “…–profile=name” (not “…-profile”) or “-p name”.