VMware ESXi 5.5 upgrade to 6.0 with CLI

esxi55upg60cli01

When the vSphere Update Manager is not available, the ESXi 5.5 upgrade to 6.0 can be performed using the CLI commands.

If you work with a single host or VUM is not available to perform the "easy way" upgrade, esxcli commands allow the administrators to upgrade the hypervisor directly from the command line using the ESXi Offline Bundle image.

From VMware website download the ESXi 6.0.0b Offline Bundle file.

esxi55upg60cli02

 

Upload image to the datastore

To allow the upgrade, you need to upload the Offline Bundle file to a datastore reachable by the ESXi.

Open the vSphere Client and go to the Summary tab, right click the datastore to use and select Browse Datastore option. Note the current ESXi version 5.5.0, 2718055.

esxi55upg60cli03

Click the Upload icon and select Upload File option.

esxi55upg60cli04

Select the Offline Bundle image and click Open.

esxi55upg60cli05

Click Yes to proceed.

esxi55upg60cli06

The file is being uploaded to the datastore.

esxi55upg60cli07

When the upload is complete, close the Datastore Browser.

esxi55upg60cli08

Shutdown the active virtual machines and put the host in Maintenance Mode. Right click the host and select Enter Maintenance Mode option.

esxi55upg60cli09

The host is now in Maintenance Mode.

esxi55upg60cli10

 

Upgrade the host

To perform the upgrade, the software profile update command is used to updates existing VIBs with the corresponding VIBs from the specified profile but does not affect other VIBs installed on the target server.

Connect the ESXi via SSH (SSH must be enabled) and set the firewall rules for httpClient running the command:

~ # esxcli network firewall ruleset set -e true -r httpClient

esxi55upg60cli11

The correct update version is required to execute the command. List the available ESXi 6.0 updates (you need the latest that ends in "standard") running the command:

~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-6

esxi55upg60cli12

Identified the correct version (in the example ESXi-6.0.0-20150704001-standard), run the command:

esxcli software profile update -d <path>/<volume_name>/<image_name> -p <profile_name>

Pay attention to run the software profile update command because software profile install overwrites drivers that the ESXi host needs.

~ # esxcli software profile update -d /vmfs/volumes/ts421_lun06_raid5/ESXi600-201507001-OfflineBundle.zip -p ESXi-6.0.0-20150704001-standard

esxi55upg60cli13

Reboot the host to complete the upgrade.

esxi55upg60cli14

When the ESXi has rebooted, right click the host and select Exit Maintenance Mode.

esxi55upg60cli15

 

Fix NICs not detected

The ESXi has been upgraded to version 6.0.0-2809209 but in the example the datastores are not connected to the host.

esxi55upg60cli16

Checking the Network configuration, the iSCSI VMKernel port doesn't have any NIC attached. The adapter hasn't been detected during the upgrade because the NIC installed in the host is a Realtek 8168 no longer supported.

esxi55upg60cli17

 

Install missing drivers

To fix the problem, Andreas Peetz made a procedure to inject the drivers directly into the host.

Run the following command to set the acceptance of the host to “community supported”

~ # esxcli software acceptance set --level=CommunitySupported

esxi55upg60cli18

Install the missing driver by running the command:

~ # esxcli software vib install -d https://vibsdepot.v-front.de -n net55-r8168

esxi55upg60cli19

Reboot the host.

esxi55upg60cli20

After reboot, the host is able to detect the missing NIC.

esxi55upg60cli21

With the working NIC, the datastores connections are restored successfully.

esxi55upg60cli22

The ESXi upgrade is now complete. Previous configuration is retained and the hypervisor is fully functional.

firma