This is a quick VMware ESXi upgrade to ESXi 7.0 U3 via a command-line interface (CLI) that allows you to quickly download and upgrade your ESXi host in case you are NOT using a vCenter server AND your hosts are without internet access. Interesting fact as I was testing other methods, as usual, and one of the upgrade types did not work (upgrade via ISO).
UPDATE:
As you may be aware, we have identified critical issues following the vSphere 7.0 U3 GA release, leading to two express patches. After further review, additional resolution complexities have come to light which we have been working around the clock to resolve, test and validate. To protect you from further impact and reduce the potential for further complexity until we have a properly vetted path forward, the decision has been made to put a hold on the full ESXi 7.0 U3 release (incl. ESXi U3, U3a and U3b) and vCenter Server U3b, removing it for download at this time. vCenter Server 7.0 U3 GA and U3a will remain available as a viable upgrade path and ESXi host backwards compatibility remains unchanged.
Update: VMware has taken down the U3 “B” and “C” due to a problem. See this KB article 86398.
Currently vSphere vCenter 7.0 U3 is available in the following versions:
- vSphere vCenter 7.0 Update 3 (build 18700403)
- vSphere vCenter 7.0 Update 3a (build 18778458). Release notes
This is the first time I upgrade a virtual ESXi and the ISO upgrade did not worked. You'll see the details at the end of the post.
So to upgrade your ESXi to the latest ESXi 7 U3, all you need to do is to basically download the latest upgrade patch from VMware Patch Portal here to your local hard drive, then place this file on a datastore visible by your ESXi host and run a couple of CLI commands.
I'm assuming that there is a lot of standalone ESXi hosts running in lab environments for testing or monitoring and all those hosts have to be updated somehow. Or you might have some isolated hosts without internet access that you have to upgrade “offline” so this is the way you can proceed. You don't need to have vCenter server to update ESXi via CLI.
I know that there has been quite a lot of questions in the past on this type of upgrade so that's why this kind of post, again.
Upgrade VMware ESXi to 7.0 U3 via command line – The steps
First, download the latest ESXi patch from VMware patch portal.
Select ESXi embedded and Installable and 7.0
then click the Search button.
Once done, check the box next to the file and click Download Selected.
The next step is to upload this file to a datastore visible by your ESXi host. In my case, I'm using local datastore named “250” (as the capacity).
Once done, migrate or power off the virtual machines running on the host and put the host into maintenance mode. (either via UI or via CLI).
Via CLI:
vim-cmd /hostsvc/maintenance_mode_enter
You can confirm if the host is in maintenance mode by running this command:
vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode
Navigate to the directory on the datastore where the patch file was uploaded to and verify that the file exists by running these commands (note: my datastore's name is “250” . It is the capacity of the datastore btw. Wanted to rename, but it is grayed out )
cd /vmfs/volumes/250
and
ls
First, let's show the profiles we have in our depot.
Enter this:
esxcli software sources profile list -d /vmfs/volumes/250/VMware-ESXi-7.0U3-18644231-depot.zip
Then pick a profile that you want to use. In our case, we pick the “standard”.
I'm picking up the “standard” as I want to have VMware tools package present on the host. The other one with “no-tools” is the one you would use for Autodeploy.
Remember, using the update command is the recommended method as it preserves VIBs. (The “install” command wipes things out). Using this command applies all of the newer contents in the file, including all security fixes.
Then enter this command to update your ESXi host
esxcli software profile update -d “/vmfs/volumes/250/VMware-ESXi-7.0U3-18644231-depot.zip” -p ESXi-7.0U3-18644231-standard
And the output:
(note: you can see that it is -d and -d, as in one of my earlier posts we had some problems with WordPress to rounding double dashes into one single one etc… Check the screenshot details if hesitating).
Once you have the message that the host has been updated successfully, you can reboot the host. After that, you'll be running the latest ESXi 7U3.
We're done.
Upgrade ESXi to ESXi 7U3 with Internet connection
You'll need to create a firewall rule to allow the ESXi host to connect the Internet. The software needs to pull down the required patches. You have to put the host into maintenance mode.
esxcli network firewall ruleset set -e true -r httpClient
To upgrade/update ESXi from VMware repository run the below esxcli command
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U3-18644231-standard
You're done.
Which upgrade methods did not work?
ISO method
I noticed a message when trying to upgrade (for testing purposes) one of my nested ESXi hosts via ISO image. As you know, you can boot the ISO on existing (non-upgraded) ESXi host and then you choose the “Upgrade ESXi, preserve VMFS datastore” option (default) which allows you to keep all files and VMs without wiping everything. I had a message that looks like this and the method did not worked.
I run only nested lab through VMware Workstation. Not a physical system. It is probably a known situation for VMware folks? If yes, please leave a comment. -:)
And as such I could not upgrade the host via ISO.
Note that this is not the only way you can upgrade as another way would be to place the upgrade files on an internal web server and proceed with the upgrade via HTTP.
Another alternative method that VMware has for patching is obviously via vSphere Lifecycle Manager, but we won't cover it here. Through vSphere lifecycle manager you can upgrade/patch your whole infrastructure managed via vCenter server. Now you can also patch your vSAN stretched cluster including the Witness appliance.
VMware vSphere Direct download/buy links:
- VMware vSphere 7.0 Essentials PLUS
- VMware vSphere 7.0 Essentials
- VMware vSphere 7.0 Enterprise PLUS
- vSphere Essentials Per Incident Support
- Upgrade to vSphere Enterprise Plus
- VMware Current Promotions
More posts from ESX Virtualization:
- vSphere 7.0 Download Now Available
- vSphere 7.0 Page [All details about vSphere and related products here]
- VMware vSphere 7.0 Announced – vCenter Server Details
- VMware vSphere 7.0 DRS Improvements – What's New
- How to Patch vCenter Server Appliance (VCSA) – [Guide]
- What is The Difference between VMware vSphere, ESXi and vCenter
- How to Configure VMware High Availability (HA) Cluster
Stay tuned through RSS, and social media channels (Twitter, FB, YouTube)
Lukasz says
Good article but 7.0.3 has many many bugs so dont upgrade to this version
Vladan SEGET says
Lukasz,
I’d like to see an official statement or KB from VMware on that. But yes, that’s possible, as with each VMware Upgrade. Do your own test before going on production servers -:). Where have you seen the info?
Branko says
Maybe he has “ESXi 7.0 Update 3 host fails with a backtrace NMI IPI” in mind.
https://kb.vmware.com/s/article/86100
Thanks for the article, it saved my ass in a test environment.
Rikard Malmborg says
Hello again Vladan, hope you are ok.
This tutorial saved my upgrade path again, but I need to ask you about allowLegcyCPU. Where would you put that switch in this upgrade? I have tried –no-hardware-warning but I still got the CPU-SUPPORT-ERROR message.
I “could” do a new installation, it is a lab machine, but would that really be required for every upgrade?
Appreciate any advice.
Rikard Malmborg says
Cold boot with ISO worked, but it seemed to have reset the ESXi. Not sure what heppened but its running.
This was of course a lab, with nothing important on it.
Jon Knowles says
The CPU support error is tripped on on anything older than 2 model processors. Basically enough so that if your server is still under warranty you’re not going to feel like you got ripped off by VMware telling you your 85k server is almost obsolete.
Joe Brouillette says
I was not able to complete the update – I received an error about an unknown url type. Here are my steps:
[root@localhost:/vmfs/volumes/5f5905d0-55d214cc-b269-6c3be5a64000/Patches] esxcli software sources profile list -d /vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.
0U3c-19193900-depot.zip
Name Vendor Acceptance Level Creation Time Modification Time
—————————– ———— —————- ——————- —————–
ESXi-7.0U3c-19193900-standard VMware, Inc. PartnerSupported 2022-01-18T00:00:00 2022-01-18T00:00:00
ESXi-7.0U3c-19193900-no-tools VMware, Inc. PartnerSupported 2022-01-18T00:00:00 2022-01-12T00:03:42
[root@localhost:/vmfs/volumes/5f5905d0-55d214cc-b269-6c3be5a64000/Patches] cd /
[root@localhost:~] esxcli software profile update -d “/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip” -p ESXi-7.0U3c-19193900-standard
[MetadataDownloadError]
Could not download from depot at “/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml, skipping ((‘“/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml’, ”, “unknown url type: ‘“/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml'”))
url = “/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml
Please refer to the log file for more details.
This is what the log file had:
[2022-01-13 00:42:11,920 root CRITICAL] Exception:503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http16LocalServiceSpecE:0x00000038e97058a0] _serverNamespace = /sdk action = Redirect _port = 8307)
[2022-01-13 00:42:11,920 root CRITICAL] Traceback (most recent call last):
File “/lib64/python3.8/site-packages/vmware/esxcli/Session.py”, line 857, in Login
File “/lib64/python3.8/site-packages/vmware/esxcli/Session.py”, line 997, in _GetServiceContent
File “/lib64/python3.8/site-packages/pyVmomi/VmomiSupport.py”, line 583, in
File “/lib64/python3.8/site-packages/pyVmomi/VmomiSupport.py”, line 373, in _InvokeMethod
File “/lib64/python3.8/site-packages/pyVmomi/SoapAdapter.py”, line 1573, in InvokeMethod
http.client.HTTPException: 503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http16LocalServiceSpecE:0x00000038e97058a0] _serverNamespace = /sdk action = Redirect _port = 8307)
[2022-02-10 00:31:09,982 root ERROR] update failed: [NoMatchError]
No image profile found with name ‘VMware-ESXi-7.0U3c-19193900-depot.zip’
id = VMware-ESXi-7.0U3c-19193900-depot.zip
Please refer to the log file for more details.
[2022-02-10 01:02:21,424 root ERROR] update failed: [MetadataDownloadError]
Could not download from depot at “/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml, skipping ((‘“/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml’, ”, “unknown url type: ‘“/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml'”))
url = “/vmfs/volumes/CS_NAS/Patches/VMware-ESXi-7.0U3c-19193900-depot.zip”/index.xml
Please refer to the log file for more details.
I’ve been trying to update the hosts in my cluster without any luck. I had a VMware guy on a forum try to help me, but his help left the host unbootable. I’m not a VMware expert but I do have decent practical experience. I’ll take any help I can get.
Thanks,
Joe B
John Andrews says
Thank you! I used your steps for command line and was able to update from 7.0 to 7.0.3. This was very easy to follow. I had to add a step to unzip the VMware…zip file between …profile list… and …profile update… steps.
Andy Migdal says
Using a custom Lenovo image to upgrade, this command finally gave me the Image name I needed.
sxcli software sources profile list -d
Thank you, i still have a little hair left.
Vladan SEGET says
Cool, thanks for sharing Andy.
Wesley says
Hi Andy,
I’m wondering if you can provide more details about your ESXi update on Lenovo Servers.
I have 5 SR-650 servers in a cluster running ESXi 7.0.1 16850804 Custom Image.
Did you use latest Lenovo Custom Image .ISO file to upgrade your ESXi hosts?
What commands did you use to perform your upgrade?
Greatly appreciate your help.
Wesley
Matt packwood says
I used:
esxcli software profile update -d https://hostupdate.vmware.com/so
ftware/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U3d-19482537-standard
Seemed to work well!