Step-by-step guide: How to Upgrade an ESXi host from the Command Line


Introduction

Are you looking for an easy way how to upgrade ESXi host from the command line? Or maybe you’re just looking for a quick guide to get started. In either case, you came to the right place.

Upgrading ESXi hosts is pretty straightforward, but you can speed up the process using the command line. This guide shows you two ways how to upgrade an ESXi host from the command line and save time while increasing your chances of success.


How to upgrade an ESXi host

When is an upgrade via the command line the only way?

Example / Details

Sometimes, your server or RAID controller is no longer supported with the latest ESXi ISO. This means Vmware has more likely removed the VIB driver of your RAID controller. When you try installing from the ISO, ESXi will not recognize your RAID controller and therefore have no way to install ESXi to your server. 

An option is to install an older ESXi version that still supports the RAID controller. After that, you can upgrade ESXi via the command line to the latest version. 

Meet Charlie AI

Go Charlie AI dog

The Best AI Content Creator

The Alternative to ChatGPT

Of course, you could integrate the VIB driver into the ISO and install the latest version immediately. However, I figured out that going the way with first installing a supported ESXi version is much easier.

The option with the command line is also the preferred method when you don’t have access to the server because it is a remote location. The only requirement is that you have a computer on-site, preferable to a physical machine.


eatured VMware ESXi barebone

Install an ESXi barebone in your homelab


Getting ready to upgrade VMware ESXi host

Upgrade requirements/image profile

There are no update requirements. Your host should, however, still be supported with the latest version of ESXi. However, it is not required since the upgrade process keeps any custom VIB drive installed.

You need access to my Vmware portal and a login to download the latest zip (image profile) version from Vmware.


What steps are involved in how to upgrade ESXi host from the command line?

In a nutshell:

There are two ways from the command line, and I show you both ways.

A few steps must be followed to upgrade an ESXi host remotely. First, you’ll need to download the latest version of ESXi from VMware’s patch portal and then upload it to your datastore. Once it’s uploaded, you can put the host into maintenance mode with either the UI or CLI. After that, you can upgrade your host from the command line using a compatible profile. Finally, reboot your host once the update is complete.

  • Method 1: Online Installation
    Download the required update directly from the VMware repository
  • Method 2: Offline Installation
    Download first the Offline Bundle (ZIP) from the My VMware portal.

Method 1 requires that your ESXi host has internet access and the firewall should allow it.

If you have a server from Dell, HP, Lenovo… I recommend installing the custom ESXi installation from the manufacturer. They already have the necessary drivers included in the Bundle. You can find the custom ISO also on My Vmware.

ESXi custom ISOs Offline Bundle

My pick

featured WordPress on Synology NAS

WordPress on Synology

How to install and run


Step 1

Put the host in maintenance mode. The easiest way is to use the web browser. Right-click the host and choose ‘enter maintenance mode’. Before that, you need to move all VMs to another host or shut down all VMs.


ESXi host maintenance mode web UI

Step 2

Now, it is time to SSH into the host for the upgrade process using the command line. I use Putty (Windows) or Termius (MAC) as my go-to ssh client.

By default, ssh is disabled on ESXi hosts. You need to start the service using the web GUI.


ESxi host ssh service

Step 3

It is also possible to put the host in maintenance mode using ssh; below is the command

esxcli system maintenanceMode set –enable true.

List all ESXi profiles available online

esxcli software sources profile list --depot=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

You will receive a long list, it is better to filter it for ESXi 8.0

esxcli software sources profile list --depot=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-8
esxcli software sources profile list -d /vmfs/volumes//62ab518c-47c98334-f7ff-0cc47a6c43c4/VMware-ESXi-7.0U3d-19482537-depot.zip
ESXi 8 online repo

Here, you can see all the profile images in the offline bundle. Which one shall I choose?

  • ESXi8.0 standard – Contains all patches
  • ESXi8.0 no-tools – Contains all patches but no VMware Tools
  • ESXi8.0 s-standard – Contains security patches only
  • ESXi8.0 s-no-tools – Contains security patches only and no VMware Tools

, so the image profile with ‘s” are security patches only.


For a detailed explanation of the ESXi profile image please visit the website of virten.net.


We want to install the standard image profile with all patches, In this case it is ESXi-8.0U1c-22088125-standard.

Please note for simplicity, I didn’t write down the number

esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-8.0U1c-22088125-standard.

You will get a warning message if you have some hardware that is no longer supported. See the command below to force the upgrade with the ‘–no-hardware-warning’ switch.

esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-8.0U1c-22088125-standard.--no-hardware-warning

When the update is successful, you will see this message

The update completed successfully, but the system needs to be rebooted for the changes to be effective.

You can also reboot the host from the web GUI. After the reboot, you should notice the new ESXi version number in the Web GUI. Please don’t forget to exit the host from the maintenance mode and also stop the ssh service. The ssh service should never run when you don’t need it. VMware will also indicate a warning in the GUI when the ssh service is running.


Step 1

Download the ESXi Upgrade file called Offline Bundle from the VMware Portal. You need to have a valid Vmware login. I find the files are not easy to find. Here is the direct download link to VMware vSphere. The ESXi hypervisor is what you are looking for. There isn’t a difference between the Hypervisor Edition and ESXi. It is the same file.

Download VMware vSphere
ESXi Offline Bundle

Step 2

Upload the zip file to your ESXi host. There are two ways: use the web browser or an SCP client like WinSCP. I prefer the web browser method.


VMware Datastore Browser
Upload location

Step 3

Put the host in maintenance mode. The easiest way is to use the web browser. Right-click the host and choose ‘enter maintenance mode’. Before that, you need to move all VMs to another host or shut down all VMs.


ESXi host maintenance mode web UI

Step 4

Now, it is time to SSH into the host for the upgrade process using the command line. I use Putty (Windows) or Termius (MAC) as my go-to ssh client.

By default, ssh is disabled on ESXi hosts. You need to start the service using the web GUI.


ESxi host ssh service

Step 5

It is also possible to put the host in maintenance mode using ssh; below is the command

esxcli system maintenanceMode set –enable true.

We need to locate the uploaded zip file in step 2 to identify the correct path naming. Type

cd /vmfs/volumes

This is the location where ESXi stores the datastores.


ESXi location of the ZIP Offline Bundle

In the picture above, you can find the ESXi Offline Bundle. In my case, I uploaded the ZIP file to the datastore ‘Dell SSD’ and to my folder ‘ISO.’

Now it’s time to upgrade ESXi with the below command. Please note to use the full path name and not symlinks like ‘Dell SSD’

In my case, the full path name to the ZIP file is

/vmfs/volumes/5f57b3ac-5e599d56-177a-2cea7f5aa14f/ISO

and here is the command for the upgrade installation

esxcli software vib install -d /vmfs/volumes/5f57b3ac-5e599d56-177a-2cea7f5aa14f/ISO/VMware-VMvisor-Installer-8.0.0.update01-22088125.x86_64-Dell_Customized-A04.zip
The update completed successfully, but the system needs to be rebooted for the changes to be effective.

You may also get a long list of VIb files installed. These are drivers. As long as you see the above message you are fine.

Step 6 (last step)

Reboot the host using this command

reboot

Don’t forget to stop the SSH service in ESXi GUI or Vcenter

What are the Vmware update methods other than from the command line?

Yes, there are a few alternative methods for upgrading an ESXi host. One is to use the ISO image, which you can download from VMware’s website. You can then create a USB boot drive and directly boot the host from the USB stick. You need to have physical access to the server. As mentioned above, this is not even an option for upgrading the ESXi host in some cases.

Another method is to upgrade your host using vSphere Lifecycle Manager (previously vSphere Update Manager). It requires Vmware Vcenter. This is not even an option if you have only the Essential Kit licensed.


What are the benefits of upgrading an ESXi host from the command line?

Some benefits of upgrading an ESXi host from the command line include automating the process and avoiding potential GUI-related issues easily. Additionally, upgrading from the command line can be faster and more reliable than using the vSphere Client or vSphere Web Client.

  • There is no need to shut down the host first
  • No physical presence is required
  • easier management
  • enhanced security

FAQ


What are the ways to upgrade ESXi host to 8 from Vmware 7?

There are two ways to upgrade an ESXi host to version 8. The first way is by using the VMware Update Manager (VUM). The second way is by using the esxcli command from the vSphere Shell.

What is the command for patching an ESXi host?

esxcli software profile update

Updating an ESXi host is a straightforward process. You will need to use the command esxcli software vib update. Before you run this command, however, you must put your host into maintenance mode. This can be done from the vSphere Client or from the CLI. Once your host is in maintenance mode, you can then run the esxcli software profile update command to install the patch. The process should not take more than a few minutes to complete.


Before you go …

I want to draw your attention to another insightful blog post of mine. If you found the information on how to upgrade ESXi host helpful, you might also be interested in a comparison I made between Proxmox and ESXi.

This post delves into their respective features, performance, and overall efficiency. Whether you’re trying to decide between the two for your homelab or looking for a more environment-friendly option, this blog post provides a comprehensive analysis that could help you make an informed decision.


Thanks for reading! Questions or comments? Let me know in the comments below or email me at [email protected]


Full Disclosure

Any purchases made from clicks on links to products on this page may result in an affiliate commission for me. 

Please keep in mind that the quantity or price of items can change at any time.

As an Amazon  Associate, I earn from qualifying purchases.

As an Aliexpress Associate, I earn from qualifying purchases. 

Als Amazon-Partner verdiene ich an qualifizierten Verkäufen

Leave a Reply

Your email address will not be published. Required fields are marked *