Skip to main content

Updating ESXi via command line

A colleague of mine wanted to update their standalone ESXi home lab server and wanted to know what quick way there is to do it.  The method I am going to describe is just for minor version update ie from U1 to U2 and not for major updates such as 6.0 to 6.5.

The method we are going to use is an esxcli command to do the update. The first step is to download the "offline bundle" from
Below I will describe a few different ways to update your ESXi host depending on your preferences and settings. 

The command that we would be using throughout the article is
esxcli software vib install -d %SourcePath%

Method 1 : Upload offline bundle (.zip) to a datastore where the ESXi host has access to 

Option a) Ensure SSH access is allowed to the host otherwise enable it first. SSH to the ESXi host and then run the command as described above, eg
esxcli software vib install -d "/vmfs/volumes/datastore1/"

Option b) If SSH is not enabled on the host or you don't want to then you can use PowerCLI instead and the commands would be 
connect-viserver Your_ESXi_IP_Or_FQDN
Set-VMhost -State Maintenance
$esxcli = Get-EsxCli -v2
The above commands will login to you ESXi host. Place the host in to maintenance mode, use EsxCli in Powershell, execute esxcli command to install update and then reboot the host. In the above command replace "Your_ESXi_IP_Or_FQDN" with your ESXi host details and "Path_To_ZIP_File" with the location of your zip eg

Method 2 : Host the update files on a web server where your ESXi host has access to. You will need to unzip the offline bundles and share those out. I used hfs from the article I written to be able to quickly setup a webserver to share those files. Make sure you do not change the structure of the extracted files

Option a) Ensure SSH access is allowed to the host otherwise enable it first. SSH to the ESXi host and then run the command as described above, eg
esxcli software vib install -d ""

Option b) If SSH is not enabled on the host or you don't want to then you can use the same PowerCLI commands as above in Method 1, option B changing the depot path to something similar as below

As you can see there are a few quick easy ways to update a standalone host for your lab environment if you need to. 


Popular posts from this blog

Rolling back a version of ESXi

There is an option in VMware where after you have performed an major upgrade of ESXi you can roll back to your previous version. The benefit of this is that you would not need to reinstall your ESXi and its configuration if you had issues with the new software. I had to do this on one occassion in my lab where I upgraded from 6.5 to 6.7 and my VMs would not run because the CPU was not supported in 6.7. Please remember if you are using ISO method to upgrade ESXi please ensure you select "Upgrade ESXi, preserve VMFS datastore". Selecting "Install ESXi, preserve VMFS datastore" does not mean preserving datastore means retaining ESXi as it will still do a clean install of ESXi. This method does not work for vSphere 7.0 as there are changes to the partitions on the boot device. Below are the steps to roll back to a previous version which is quite straight forward. As always perform an backup of your host configuration before you upgrade or rollback ( KB2042141 ). I have

Configuring ESXi 6 host to send logs to Syslog Server

In my previous post I talked about configuring VMware Syslog server for Windows which is installed and enabled by default on installation of vCenter 6 for Windows. I will now describe the basic configuration that is required on an ESXi 6 host to be able to send logs out to a syslog server using my vCenter as the example. 1) Navigate to your ESXi host within vCenter. Go to "Manage" tab and select "Settings" followed by "Advanced System Settings". Look for the settings "" and highlight this settings. Click the pencil icon to edit the configuration for this setting. 2) You can now add the host name or ip address of your syslog server/s. You can enter just hostname or IP address, use udp://hostname:514 or ssl://hostname:1514 to be more specific on the port and protocol to be used. If you have multiple hosts then you use the comma (,) to separate each server i.e. udp://,udp:// 3)We n

Custom ESXi Image - ISO using PowerCLI

There comes a time when you have purchased a new hardware to run your ESXi software and discover that the installable base media provided by VMware does not include the drivers or the drivers are out of date. In the world of Windows (Plug and Play) it would discover the hardware and prompt you to provide the drivers so that Windows would install/update the drivers for the hardware. For ESXi if the drivers are not present during load time then the hardware will possibly not work. VMware uses VIB (vSphere Installation Bundle) as a way for vendors to distribute their drivers. To install these VIBs you can either use Update Manager or command line (esxcli). Now this is all good but it does mean you have to first install the base ESXi then use one of the steps above to install/update the drivers.   Some people might feel that it is OK to update the drivers using the above methods but what if it was the network card that was the new hardware and you needed new drivers. Without the net