Installing patches on an ESXi 5.0 host from the command line

Purpose

This article outlines the procedure for installing patches on an ESXi 5.0 host from the command line using esxcli software vibcommands.
  • For more information on installing VIBs on an ESX host, see Update a Host with Individual VIBs in the vSphere 5 Documentation Center.

  • You can also install patches using esxcli software profile commands. For more information, see Getting Started with vSphere Command-Line Interfaces in the vSphere 5 Documentation Center.

  • To patch an ESXi 5.0 host using the Update Manager, see Applying Patches to Hosts in the vSphere 5 Documentation Center.

Resolution

To patch an ESXi 5.0 host from the command line:

  1. Patches for VMware products can be obtained from the VMware patch portal. Select ESXi (Embedded and Installable) in the product dropdown and click Search.

  2. Click the Download link below the patch Release Name to download the patch to your system.

  3. Upload the patch to a datastore on your ESXi 5.0 host using the Datastore Browser from vCenter or a direct connection to the ESXi 5.0 host using the vSphere client.

    Note: VMware recommends creating a new directory on the datastore and uploading the patch file to this directory.

  4. Log into the local Tech Support Mode console of the ESXi 5.0 host. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

  5. Migrate or power off the virtual machines running on the host and put the host into maintenance mode. The host can be put into maintenance mode from the command line with:

    # vim-cmd hostsvc/maintenance_mode_enter

  6. Navigate to the directory on the datastore where the patch file was uploaded to and verify that the file exists:

    # cd /vmfs/volumes/Datastore/DirectoryName
    # ls


    Where Datastore is the datastore name where the patch file was uploaded to, and DirectoryName is the directory you created on the datastore.

  7. Install or Update a patch on the host using these esxcli commands:

    Notes:

    • To install or update a .zip file, use the -d option. To install or update a .vib file use the -v option.

    • Using Install overwrites the existing packages in the system with contents of the patch you are installing, including installing new packages and removing old packages. The Install command can be used to downgrade a system. Using Update selectively overwrites existing packages that are being up-revisioned and ignores new packages. The Update command can be used to downgrade a system (only for image profiles) when the --allow-downgrade flag is set.

    To Install:

    • Using local setup:

      # esxcli software vib install -d "/vmfs/volumes/Datastore/DirectoryName/PatchName.zip"

      Where PatchName.zip is the name of the patch file you uploaded to the datastore.

      For example:

      # esxcli software vib install -d "/vmfs/volumes/datastore1/patch-directory/ESXi500-201111001.zip"

    • Using http setup:

      # esxcli software vib install -v viburl

      Where viburl is the URL to the http depot where VIB packages reside.

      For example:

      # esxcli software vib install -v https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_5.0.0-0.7.515841.vib

    To Update:

    • Using local setup:

      # esxcli software vib update -d "/vmfs/volumes/Datastore/DirectoryName/PatchName.zip"

      Where PatchName.zip is the name of the patch file you uploaded to the datastore.

      For example:

      # esxcli software vib update -d "/vmfs/volumes/datastore1/patch-directory/ESXi500-201111001.zip"

    • Using http setup:

      # esxcli software vib update -v viburl

      Where viburl is the URL to the http depot where VIB packages reside.

      For example:

      # esxcli software vib update -v https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_5.0.0-0.7.515841.vib

  8. Verify that the VIBs are installed on your ESXi host:

    # esxcli software vib list

    For example:

    # esxcli software vib list

    Name              Version                     Vendor Acceptance Level Install Date
    ----------------- --------------------------- ------ ---------------- ------------
    ata-pata-amd      0.3.10-3vmw.500.0.0.469512  VMware VMwareCertified  2012-05-04
    ata-pata-atiixp   0.4.6-3vmw.500.0.0.469512   VMware VMwareCertified  2012-05-04
    ata-pata-cmd64x   0.2.5-3vmw.500.0.0.469512   VMware VMwareCertified  2012-05-04
    ata-pata-hpt3x2n  0.3.4-3vmw.500.0.0.469512   VMware VMwareCertified  2012-05-04


  9. After the patch has been installed, reboot the ESX host:

    # reboot

  10. After the host has finished booting, exit maintenance mode and power on the virtual machines:

    # vim-cmd hostsvc/maintenance_mode_exit



Based on VMware KB 2008939

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Hardware and firmware requirements for 64-bit guest operating systems

PurposeThis article explains the host machine hardware and firmware requirements for installing...

Logging in to the vCenter Server 5.0 Web Client fails with the error: unable to connect to vCenter Inventory Service

DetailsAfter upgrading from vCenter Server 4.1 to 5.0, you experience these symptoms:Cannot log...

Multiple network entries in vCenter Server 5.0.x after migrating virtual machines from a virtual switch to a virtual distributed switch

SymptomsAfter migrating virtual machines from a virtual switch to a virtual Distributed...

Minimum requirements for the VMware vCenter Server 5.x Appliance

PurposeIf you are using the VMware vCenter Server Appliance, beginning with vSphere 5.0 you can...