Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Virtualization / VMWare / Updating VMware ESXi Host from the Command Line

May 11, 2022 VirtualizationVMWare

Updating VMware ESXi Host from the Command Line

In this article, we’ll show how to manually patch a VMware host from the command line, and how to upgrade your ESXi version (in this example, we will upgrade a VMware ESXi 6.7 host to version 7.0).

You can manually update VMware ESXi from the esxcli console on standalone ESXi hosts (or free VMware vSphere Hypervisor), small installations, or test environments. To update a large VMware vSphere infrastructure with vCenter, it is better to use VMware Update Manager/VMware Lifecycle Manager.

Contents:
  • How to Install Updates (Patches) on VMware ESXi with ESXCLI Command?
  • Upgrading VMware ESXi Version Using ESXCLI

Check the current ESXi version installed on your server. You can do it in the vSphere Web Client:

vSphere Web Client - get esxi version

Or from the ESXi console using the command:

vmware -v

vmware -v : check version with cli

In this example, VMware ESXi 6.7.0 build-1716773 is installed on the server.

How to Install Updates (Patches) on VMware ESXi with ESXCLI Command?

If you want to install security updates/bug fixes/patches on your ESXi host, download the latest patch release for your OS version.

ESXi patches are cumulative, which means they include all previous updates. Always install the latest available update for your ESXi release.

To install the ESXi rollup update offline:

  1. Sign in to the VMware website (you can use a personal account) and go to https://my.vmware.com/group/vmware/patch;
  2. Select a product: ESXi (Embedded and Installable) and your ESXi build;
  3. The latest available update is ESXi670-202201001 (Build Number: 19195723) with the release date 2022-01-25; download patch (update) for esxi from vmware website
  4. Download a ZIP file with the update;
  5. Use the Datastore Browser to copy the archive to any datastore available to your host (it may be a local disk, an NFS folder, a VMFS LUN connected over iSCSI or Fiber Channel, or an external USB drive connected to your ESXi host). If there is not enough free space, expand the VMFS datastore; copy esxi patch to datastore
  6. Connect to your ESXi host via SSH and put the host in the maintenance mode: esxcli system maintenanceMode set --enable=true
  7. To install the patch, run the command: esxcli software vib update --depot /vmfs/volumes/87654321-12345678-7a20-000c12345678/update/ESXi670-202111001.zip esxcli install esxi update from command line
    Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
    Reboot Required: true
  8. Reboot your ESXi host: reboot -f
  9. Disable the maintenance mode: esxcli system maintenanceMode set --enable=false
  10. Make sure that the OS version has been updated: vmware –v
You can also use the PowerCLI module to install updates on ESXi:

Install-VMHostPatch -HostPath /vmfs/volumes/volume/esxi_patch.zip

Upgrading VMware ESXi Version Using ESXCLI

You can manually upgrade the ESXi version on your host. In this example, I will upgrade ESXi from v6.7 to v7.0.

  • If you are going to upgrade your ESXi version, make sure that your server hardware is supported by the newer OS version. Use VMware Compatibility Guide and VMware Product Interoperability Matrix to do it.
  • If the host is connected to a vCenter, do not upgrade the ESXi version before upgrading the vCSA version.

There are two ways to upgrade the ESXi version from the esxcli command line:

  • An offline upgrade — you must manually download an ESXi installation image to the local datastore;
  • An online upgrade — may be used if your ESXi can access the VMware repository via the Internet.

First of all, let’s look at how to perform an offline upgrade. Download an offline ESXi image:

  1. Go to https://customerconnect.vmware.com/downloads/info/slug/datacenter_cloud_infrastructure/vmware_vsphere/7_0;
  2. Find the VMware ESXi version you want to upgrade to. If you are using a custom ESXi image from the vendor, go to the Custom ISOs tab. In my example, I will use the HPE — HPE Custom Image for ESXi 7.0 U2 Install CD image. Download HPE Custom Image for ESXi 7.0 U2 Offline Bundle. download custom esxi install image for hpe servers
  3. Copy the image to any datastore available from your ESXi host;
  4. Display the list of available profiles in the image: esxcli software sources profile list -d /vmfs/volumes/datastore1/update/VMware-ESXi-7.0.2-17867351-HPE-702.0.0.10.7.0.52-May2021-depot.zip
  5. In our example, there is only one profile: HPE-Custom-AddOn_702.0.0.10.7.0-52;
  6. Put the host into maintenance mod: esxcli system maintenanceMode set --enable=true
  7. Upgrade the ESXi version using the selected profile: esxcli software profile update -d /vmfs/volumes/datastore1/update/VMware-ESXi-7.0.2-17867351-HPE-702.0.0.10.7.0.52-May2021-depot.zip -p HPE-Custom-AddOn_702.0.0.10.7.0-52
    If [Errno 28] No space left on device error appears, follow this guide.
  8. In my case, the command returned that the CPU model is not supported in the following versions:
  9. [HardwareError]
    Hardware precheck of profile HPE-Custom-AddOn_702.0.0.10.7.0-52 failed with warnings: <CPU_SUPPORT WARNING: The CPU in this host may not be supported in future ESXi releases. Please plan accordingly.>
    

    xcli software profile update via internet

  10. To ignore this warning, add the —no-hardware-warning option to the command: esxcli software profile update -d /vmfs/volumes/datastore1/update/VMware-ESXi-7.0.2-17867351-HPE-702.0.0.10.7.0.52-May2021-depot.zip -p HPE-Custom-AddOn_702.0.0.10.7.0-52 --no-hardware-warning
    If any dependency errors appear, you can ignore them using -f option. However, it may result in unexpected issues later when running ESXi. It is better to resolve dependencies and add a driver you need to the ESXi installation image.
    [DependencyError]
    VIB VMW_bootbank_vmkusb_0.1-4vmw.670.3.159.18828794 requires vmkapi_incompat_2_5_0_0, but the requirement cannot be satisfied within the ImageProfile. 
    

  11. Reboot the host after the upgrade is complete;
  12. Check that the server is now running the new ESXi 7.0 Update 2; upgrade vmware esxi to new version
  13. Install the vSphere license and configure the inactivity timeout.

To upgrade an ESXi version online:

  1. Allow HTTP traffic in the ESXi firewall: esxcli network firewall ruleset set -e true -r httpClient
  2. View a list of available ESXi profiles in the VMware online depot: esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-7.0
  3. Find the name of the profile you need and upgrade the ESXi version: esxcli software profile update -p HPE-Custom-AddOn_702.0.0.10.7.0-52 -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
  4. Disable HTTP Internet access: esxcli network firewall ruleset set -e false -r httpClient

In this article, we looked at how to install patches on a VMware ESXi host and update an OS version on your server from ESXi 6.7 to vSphere 7.0U2.

0 comment
0
Facebook Twitter Google + Pinterest
previous post
Enable or Disable MFA for Users in Azure/Microsoft 365
next post
Deploying Software (MSI Packages) Using Group Policy

Related Reading

Recovering a Deleted VMFS Datastore on VMware ESXi/vSphere

July 7, 2022

How to Access VMFS Datastore from Linux, Windows,...

July 1, 2022

How to Change or Disable Session Timeout in...

April 13, 2022

Managing Hyper-V Virtual Machines with PowerShell

March 15, 2022

How to Upgrade VM Hardware Version in VMware...

March 4, 2022

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows 7
  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2
  • PowerShell
  • VMWare
  • Hyper-V
  • MS Office

Recent Posts

  • How to Remove (Demote) a Domain Controller in Active Directory?

    August 16, 2022
  • Configure SSL Connection Encryption in MS SQL Server

    August 15, 2022
  • Managing Microsoft Teams with PowerShell

    August 15, 2022
  • Using Windows Update Delivery Optimization in Local Networks

    July 21, 2022
  • How to Enable Two-Factor Authentication (2FA) for SSH on Linux?

    July 21, 2022
  • How to Install and Configure OpenVPN Server on Windows?

    July 18, 2022
  • Manage Groups in Azure AD and Microsoft 365 Using PowerShell

    July 15, 2022
  • Windows Setup Couldn’t Create a New Partition

    July 15, 2022
  • Invoke-WebRequest: Perform HTTP Requests, Download Files, Parse Web with PowerShell

    July 13, 2022
  • Configuring Port Forwarding in Windows

    July 13, 2022

Follow us

woshub.com

ad

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Access VMFS Datastore from Linux, Windows, or ESXi?
  • Shrinking VMDK Virtual Disk Size on VMWare ESXi
  • USB Device Passthrough (Redirect) to Hyper-V Virtual Machine
  • Poor Network Performance on Hyper-V VMs in Windows Server 2019
  • How to Install Windows 11 on a Hyper-V Virtual Machine?
  • Accessing USB Flash Drive from VMWare ESXi
  • Windows Cannot Find the Microsoft Software License Terms
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top