Upgrade VMware to 7.03 via command line interface (CLI)

At last weeks VMworld conference, VMware released ESXi v7.03. I know what many of you are thinking, oh here we go. More pain in the butt upgrades.

Well, this is perhaps the easiest of all the upgrades out there. A simple one liner at the CLI of the host, and you are upgraded (also need a reboot of the host). So what do we need to to do get started?

The first thing we need to do is enable both SSH and ESXi Shell on the host that you plan to upgrade.

Remember to stop these services once the upgrade has been completed as these are potential points of access for bad guys out there.

Now that SSH and ESXi shell have been enabled, we need to SSH into the host. Let’s run the following command to check the current version.

vmware -v

image

As you can see we are running ESXi v7.02 build 17867351, so not terribly out of date, let’s upgrade this sucker! We need the below command. By the way, this method of upgrading VMware ESXi assumes that the host has internet access

esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U3-18644231-standard

As I am running this on desktop hardware in my lab, my first attempt threw an error about the CPU.

[root@localhost:~] esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U3-18644231-standard
[HardwareError]
Hardware precheck of profile ESXi-7.0U3-18644231-standard failed with warnings: <CPU_SUPPORT WARNING: The CPU in this host may not be supported in future ESXi releases. Please plan accordingly.>

Apply --no-hardware-warning option to ignore the warnings and proceed with the transaction.
Please refer to the log file for more details.

So let’s try again with the new switches.

Eventually you will see the following on your screen.

[root@localhost:~] esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U3-18644231-standard --no-hardware-warning
Update Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true

We now need to reboot the host by issuing a simple reboot command from the command line

image

Once the host comes back around, login to the SSH console and verify that the upgrade has been successful by issuing the VMware -v command once again.

image

1 Like

Very helpful, thank you

@Arash_Azari_Samani Not a problem, I am glad you enjoyed the article!

BTW, welcome to the community, I look forward to chatting with you on a regular basis.

Thanks I love you!!!

@Leonardo_Garcia Us too!