Home > VMware, VMware ESXi > Upgrading from ESXi 6.5 to ESXi 6.7 via SSH and esxcli

Upgrading from ESXi 6.5 to ESXi 6.7 via SSH and esxcli

Following VMware’s release of ESXi 6.7, I upgraded my ESXi 6.5 server to ESXi 6.7 using SSH and esxcli. For those interested, see below the jump for the details of the process I used.

Screen Shot 2018 05 15 at 3 31 55 PM

To upgrade from ESXi 6.5 to 6.7 using esxcli

 

1. Shut down all VMs running on your ESXi host machine.

2. Enable SSH on your ESXi server, if it is not already enabled.

3. Connect via SSH.

Screen Shot 2018 05 15 at 2 59 08 PM

4. Once logged in, run the following command to enter maintenance mode:

vim-cmd /hostsvc/maintenance_mode_enter

 

Screen Shot 2018 05 15 at 3 00 20 PM

 

5. After putting ESXi into maintenance mode, run the following command to set the correct firewall rules for the httpClient:

esxcli network firewall ruleset set -e true -r httpClient

 

Screen Shot 2018 05 15 at 3 01 06 PM

 

6. Next, run the following command to list the ESXi 6.7 updates available. You want the latest one that ends in -standard for your version of VMware.

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

 

Screen Shot 2018 05 15 at 3 03 39 PM

 

7. Once you’ve identified the correct version of VMware (as of 5-18-2018, this is ESXi-6.7.0-8169922-standard), run the following command to download and install the update.

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

 

Screen Shot 2018 05 15 at 3 45 50 PM

 

Note: It is very important that you run esxcli software profile update here. Running esxcli software profile install may overwrite drivers that your ESXi host needs.

 

8. Once the update has been installed and prompts you to reboot, run the following command to restart:

reboot

 

Screen Shot 2018 05 15 at 3 46 57 PM

9. After your ESXi host restarts, connect via SSH and run the following command to exit maintenance mode:

vim-cmd /hostsvc/maintenance_mode_exit

 

Screen Shot 2018 05 15 at 3 49 38 PM

 

At this point, your ESXi host should be upgraded to ESXi 6.7.0.

Screen Shot 2018 05 15 at 3 50 44 PM

Categories: VMware, VMware ESXi
  1. May 16, 2018 at 6:12 pm

    As always, thanks for this, Rich.

    3 snags I ran into in our upgrade that I had to figure on our ESXi host in order to upgrade to 6.7:

    1) Enabling SSH. While the SSH Server firewall rule was enabled, the SSH service was not enabled. I enabled this by going to Host > Manage > Services > and enabling TSM-SSH.

    2) Entering maintenance mode. Wasn’t able to do this via the command line for some reason, so I did this via the Web GUI: Host > Actions > Enter maintenance mode

    3) Enabling swap. When first running the esxcli software profile update command, I got a “Errno 28 No space left on device” error. Found this thread (https://communities.vmware.com/thread/560543) and determined that while swap was enabled on the host it was not assigned to a datastore. Host > Manage > Swap > Make sure is enabled, datastore is selected, and that host cache and local swap were enabled (Host cache and local swap were enabled on our host by default)

  2. June 6, 2018 at 8:34 am

    Brilliant thanks. I too had the swap issue, so followed @aporlebeke suggestion and all worked swimmingly! Many thanks

  3. rahul samson
    August 30, 2018 at 10:50 pm

    what a helpful post. the only step I had to add was to configure dns server.
    esxcli network ip dns server add –server=8.8.8.8
    rest of the steps and upgrade completed without any issues. Thanks.

  4. esxiwurm
    September 23, 2018 at 1:08 pm

    hi all

    I tried this upgrade process including the steps mentioned by aporlebeke but it did not work.

    I’ve got the following output:

    [root@ESXI:~] esxcli software profile update -d https://hostupdate.vmware.com/so
    ftware/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.7.0-8169922-standard
    [InstallationError]
    Failed updating the bootloader: Execution of command /usr/lib/vmware/bootloader-installer/install-bootloader failed: non-zero code returned
    return code: 1
    output: ERROR: ld.so: object ‘/lib/libMallocArenaFix.so’ from LD_PRELOAD cannot be preloaded: ignored.
    Traceback (most recent call last):
    File “/usr/lib/vmware/bootloader-installer/install-bootloader”, line 267, in
    main()
    File “/usr/lib/vmware/bootloader-installer/install-bootloader”, line 234, in main
    partType, diskGeom, parts = getDiskInfo(diskPath)
    File “/usr/lib/vmware/bootloader-installer/install-bootloader”, line 155, in getDiskInfo
    rc, out, err = execCommand(command)
    File “/usr/lib/vmware/bootloader-installer/install-bootloader”, line 98, in execCommand
    raise Exception(“%s failed to execute: status(%d)” % (command, process.returncode))
    Exception: /sbin/partedUtil getptbl /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0 failed to execute: status(255)
    vibs = VMware_bootbank_esx-base_6.7.0-0.0.8169922
    Please refer to the log file for more details.

    btw: ESXI is installed on a 16 GB stick. Any idea how to fix this? thanks a lot.

  5. Wesly Degurre
    November 7, 2018 at 6:04 pm

    thanks for the learning

  6. you
    May 19, 2019 at 6:18 pm

    brilliant, thanks for this excellent HOWTO (upgrade ESXi 6.5 to 6.7U2)

  7. Chris
    July 11, 2019 at 12:08 am

    6.7U2 needing: esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.7.0-20190402001-standard

  8. Standa Dolejší
    May 5, 2020 at 12:13 am

    5/5/2020 – i needed skip sign check, updated succesfully
    esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.7.0-20200404001-standard –no-sig-check

  9. Mal
    June 30, 2020 at 10:42 pm

    I have followed these instructions a few times but my server keeps showing as 6.5.0 Update 2 (Build 13873656) despite there being no errors during the upgrade. Any idea why this would be? Thanks

  1. No trackbacks yet.

Leave a comment