Update a standalone ESXi server using vSphere CLI

I recently implemented a branch office in a box (BOB) scenario using the free edition of the ESXi hypervisor, one of the number of maintenance tasks that will need to be performed is to update the OS and therefore I decided that the method of deploying these updates will be to use the vSphere CLI to connect to a depot and install the update. This can be performed by using the following steps;

1) Run the VMware vSphere CLI and browse to the ‘C:\Program Files\VMware\VMware vSphere CLI\bin’ directory.

2) Enter host into maintenance mode by using the following command:

vicfg-hostps.pl –server <ESXi server> –operation enter

3) Copy the update file to the root of the datastore on the host.

4) Following the host being place in maintenance mode install the update, specifying the update file path in Step 3 as the depot.

esxcli.exe –server <ESXi server> software vib update –depot=/vmfs/volumes/<datastore>/<update>.zip

5) Once the update is completed successfully you may be prompted to restart the system for the changes to be effective.

6) Restart the host if prompted in Step 5 using the following command:

vicfg-hostps.pl –server <ESXi server> –operation reboot

7) Exit the host from maintenance mode using the following command:

vicfg-hostps.pl –server <ESXi server> –operation exit

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s