Updating ESXi 5 - Single use esxcli How To

Updating ESXi 5 - Single use esxcli How To

This is a modernized version of the "Single use vihostupdate How To for ESXi 4.x, which was a modernized version of the "Single use ESXUPDATE How To for ESX 4"  post I wrote a long time ago. With vSphere 5, vihostupdate and esxupdate are not applicable for ESXi 5. We instead will need to use the esxcli command to apply the updates to our ESXi 5 hosts.

01: Make sure you have the vMA 5.0 or the vCLI installed and configured or that you have ESXi Shell access on the ESXi 5 host.

02: Download the patch bundle directly from VMware Support. This download will be .zip file.  Do not extract it.

03: Upload the .zip file to a datastore that is accessible on the ESXi host you wish to update. The syntax below will use /vmfs/volumes/datastore1, and you may need to adjust as necessary. Note that the .zip file is uploaded to the ESXi host.

Note:  In the examples below, the syntax is specific for the vMA. Adjust accordingly, if you are using another approach.


04: Obtain local console access to the vMA and login with the vi-admin account.

05. To determine if the host needs to be placed in maintenance mode, issue the following command:

esxcli --server=10.10.10.10 --username=root software sources vib get -d /vmfs/volumes/datastore1/ESXi500-201109001.zip | grep "Maintenance Mode Required: True"

06.  If grep returns "Maintenance Mode Required: True" results, then issue the following command to place the host in maintenance mode:

vicfg-hostops --server 10.10.10.10 --operation enter

07. Verify that the host is in maintenance mode, by issuing the following command:

vicfg-hostops --server=10.10.10.10 --operation info

Note: You could also use the vSphere Client to put the ESXi 5 host in maintenance mode.

08. To verify which VIBs are already installed on the ESXi 5 host, issue the following command:

esxcli --server=10.10.10.10 --username=root software vib list | more

09. To find out which VIBs are available in the depot (the downloaded .zip file), issue the following command:

esxcli --server=10.10.10.10 --username=root software sources vib list --depot=/vmfs/volumes/datastore1/ESXi500-201109001.zip | more

10. To update the ESXi 5 host with the VIBs included in the depot, issue the following command:

esxcli --server=10.10.10.10 --username=root software vib update --depot=/vmfs/volumes/datastore1/ESXi500-201109001.zip

11. When the update is complete, verify the information presented. If prompted, reboot the ESXi 5 host by issuing the following command:

vicfg-hostops --server 10.10.10.10 --operation reboot

12. Verify the patch bundle was installed, by issuing the following command:

esxcli --server=10.10.10.10 --username=root software vib list | more

13. If applicable, take the ESXi 5 host out of maintenance mode using the vSphere Client or with the following command:

vicfg-hostops --server 10.10.10.10 --operation exit

As always, thanks for reading!

Comments

Thanks for this post. In IE item 9's code is hidden, shows find in Chrome - for reference here is the line

The code for item 9 in the list is:

esxcli --server=10.10.10.10 --username=root software sources vib list --depot=/vmfs/volumes/datastore1/ESXi500-201109001.zip | more

Thanks

Marcus

Thanks Marcus - I believe I have corrected the formatting error.

I have tried the following CMD and it worked.

esxcli software vib install -d /vmfs/volumes/ESX1Local/ESXi500-201109001.zip

Regards

V V Jacob / Manorama

ok so i applied the patch via the command:

~ # esxcli software vib update --depot=/vmfs/volumes/datastore1/ESXi500-201111001.zip

and here are the results:

Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMware_bootbank_esx-base_5.0.0-0.4.504890, VMware_locker_tools-light_5.0.0-0.3.474610
   VIBs Removed: VMware_bootbank_esx-base_5.0.0-0.0.469512, VMware_locker_tools-light_5.0.0-0.0.469512
   VIBs Skipped: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-atiixp_0.4.6-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-via_0.3.3-2vmw.500.0.0.469512, VMware_bootbank_block-cciss_3.6.14-10vmw.500.0.0.469512, VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.0.0.469512, VMware_bootbank_esx-tboot_5.0.0-0.0.469512, VMware_bootbank_ima-qla4xxx_2.01.07-1vmw.500.0.0.469512, VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.500.0.0.469512, VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.500.0.0.469512, VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.500.0.0.469512, VMware_bootbank_misc-cnic-register_1.1-1vmw.500.0.0.469512, VMware_bootbank_misc-drivers_5.0.0-0.0.469512, VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.0.469512, VMware_bootbank_net-bnx2_2.0.15g.v50.11-5vmw.500.0.0.469512, VMware_bootbank_net-bnx2x_1.61.15.v50.1-1vmw.500.0.0.469512, VMware_bootbank_net-cnic_1.10.2j.v50.7-2vmw.500.0.0.469512, VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.0.469512, VMware_bootbank_net-e1000e_1.1.2-3vmw.500.0.0.469512, VMware_bootbank_net-enic_1.4.2.15a-1vmw.500.0.0.469512, VMware_bootbank_net-forcedeth_0.61-2vmw.500.0.0.469512, VMware_bootbank_net-igb_2.1.11.1-3vmw.500.0.0.469512, VMware_bootbank_net-ixgbe_2.0.84.8.2-10vmw.500.0.0.469512, VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.0.0.469512, VMware_bootbank_net-r8168_8.013.00-3vmw.500.0.0.469512, VMware_bootbank_net-r8169_6.011.00-2vmw.500.0.0.469512, VMware_bootbank_net-s2io_2.1.4.13427-3vmw.500.0.0.469512, VMware_bootbank_net-sky2_1.20-2vmw.500.0.0.469512, VMware_bootbank_net-tg3_3.110h.v50.4-4vmw.500.0.0.469512, VMware_bootbank_ohci-usb-ohci_1.0-3vmw.500.0.0.469512, VMware_bootbank_sata-ahci_3.0-6vmw.500.0.0.469512, VMware_bootbank_sata-ata-piix_2.12-4vmw.500.0.0.469512, VMware_bootbank_sata-sata-nv_3.5-3vmw.500.0.0.469512, VMware_bootbank_sata-sata-promise_2.12-3vmw.500.0.0.469512, VMware_bootbank_sata-sata-sil_2.3-3vmw.500.0.0.469512, VMware_bootbank_sata-sata-svw_2.3-3vmw.500.0.0.469512, VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.0.0.469512, VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.500.0.0.469512, VMware_bootbank_scsi-aic79xx_3.1-5vmw.500.0.0.469512, VMware_bootbank_scsi-bnx2i_1.9.1d.v50.1-3vmw.500.0.0.469512, VMware_bootbank_scsi-fnic_1.5.0.3-1vmw.500.0.0.469512, VMware_bootbank_scsi-hpsa_5.0.0-17vmw.500.0.0.469512, VMware_bootbank_scsi-ips_7.12.05-4vmw.500.0.0.469512, VMware_bootbank_scsi-lpfc820_8.2.2.1-18vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid-sas_4.32-1vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.500.0.0.469512, VMware_bootbank_scsi-mpt2sas_06.00.00.00-5vmw.500.0.0.469512, VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.0.0.469512, VMware_bootbank_scsi-mptspi_4.23.01.00-5vmw.500.0.0.469512, VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512, VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512, VMware_bootbank_uhci-usb-uhci_1.0-3vmw.500.0.0.469512

rebooted after that. the time this time was shorter but it still got stuck for like 2-3 minutes. before it was somewhat longer like 7-10 minutes.

i suppose its an improvement. i dont know what to say honestly

worked without problems like this

whole path must be used

esxcli software vib install -d /vmfs/volumes/[DATASTORE]/[PATCH_FILE].zip

I would just like to say that this is a very well written article. Thanks for the help.

Maybe a stupid question but is nfs shares supportet as datastore ? if so what is the path ? /vmfs/volumes/ are for a phy disk  but what are the path for nfs ?

Thanks

Thanks!

Yes, you can use NFS datastores. The path is the same for NFS as it would be for VMFS:
/vmfs/volumes/<NFS Datastore Name>

I have the vCLI installed on my Windows 7 Ultimate x64 workstation, the pearl script manager was installed and is working. I even restarted my workstation however the vicfg-hostops isn't working windows tells me when I enter the command from the vcli command prompt that it doesn't exsist.

Plesae advise.

Sounds like a PATH issue. If you took the defaults during install, try changing to the following directory:

C:\Program Files\VMware\VMware vSphere CLI\bin

Run the vicfg-hostops command from there and see if it works. You may need to manually add the above location to your PATH variable.

Errm ... you are on a Windows host, the commands above are for a linux host. So just add '.pl' after the vicfg-hostops and you're good Smiley Happy

Step 5 would like this then:

vicfg-hostops.pl --server 10.10.10.10 --operation enter

Why did it skip everything? Smiley Sad

Command that i used: esxcli software vib update --depot=/vmfs/volumes/backup/ESXi500-201112001.zip

Installation Result
   Message: Host is not changed.
   Reboot Required: false
   VIBs Installed:
   VIBs Removed:
   VIBs Skipped: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-atiixp_0.4.6-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-via_0.3.3-2vmw.500.0.0.469512, VMware_bootbank_block-cciss_3.6.14-10vmw.500.0.0.469512, VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.0.0.469512, VMware_bootbank_esx-base_5.0.0-0.7.515841, VMware_bootbank_esx-tboot_5.0.0-0.0.469512, VMware_bootbank_ima-qla4xxx_2.01.07-1vmw.500.0.0.469512, VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.500.0.0.469512, VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.500.0.0.469512, VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.500.0.0.469512, VMware_bootbank_misc-cnic-register_1.1-1vmw.500.0.0.469512, VMware_bootbank_misc-drivers_5.0.0-0.7.515841, VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841, VMware_bootbank_net-bnx2_2.0.15g.v50.11-5vmw.500.0.0.469512, VMware_bootbank_net-bnx2x_1.61.15.v50.1-1vmw.500.0.0.469512, VMware_bootbank_net-cnic_1.10.2j.v50.7-2vmw.500.0.0.469512, VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841, VMware_bootbank_net-e1000e_1.1.2-3vmw.500.0.7.515841, VMware_bootbank_net-enic_1.4.2.15a-1vmw.500.0.0.469512, VMware_bootbank_net-forcedeth_0.61-2vmw.500.0.0.469512, VMware_bootbank_net-igb_2.1.11.1-3vmw.500.0.0.469512, VMware_bootbank_net-ixgbe_2.0.84.8.2-10vmw.500.0.0.469512, VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.0.0.469512, VMware_bootbank_net-r8168_8.013.00-3vmw.500.0.0.469512, VMware_bootbank_net-r8169_6.011.00-2vmw.500.0.0.469512, VMware_bootbank_net-s2io_2.1.4.13427-3vmw.500.0.0.469512, VMware_bootbank_net-sky2_1.20-2vmw.500.0.0.469512, VMware_bootbank_net-tg3_3.110h.v50.4-4vmw.500.0.0.469512, VMware_bootbank_ohci-usb-ohci_1.0-3vmw.500.0.0.469512, VMware_bootbank_sata-ahci_3.0-6vmw.500.0.0.469512, VMware_bootbank_sata-ata-piix_2.12-4vmw.500.0.0.469512, VMware_bootbank_sata-sata-nv_3.5-3vmw.500.0.0.469512, VMware_bootbank_sata-sata-promise_2.12-3vmw.500.0.0.469512, VMware_bootbank_sata-sata-sil_2.3-3vmw.500.0.0.469512, VMware_bootbank_sata-sata-svw_2.3-3vmw.500.0.0.469512, VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.0.0.469512, VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.500.0.0.469512, VMware_bootbank_scsi-aic79xx_3.1-5vmw.500.0.0.469512, VMware_bootbank_scsi-bnx2i_1.9.1d.v50.1-3vmw.500.0.0.469512, VMware_bootbank_scsi-fnic_1.5.0.3-1vmw.500.0.0.469512, VMware_bootbank_scsi-hpsa_5.0.0-17vmw.500.0.0.469512, VMware_bootbank_scsi-ips_7.12.05-4vmw.500.0.0.469512, VMware_bootbank_scsi-lpfc820_8.2.2.1-18vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid-sas_4.32-1vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.500.0.0.469512, VMware_bootbank_scsi-mpt2sas_06.00.00.00-5vmw.500.0.0.469512, VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.0.0.469512, VMware_bootbank_scsi-mptspi_4.23.01.00-5vmw.500.0.0.469512, VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512, VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512, VMware_bootbank_uhci-usb-uhci_1.0-3vmw.500.0.0.469512, VMware_locker_tools-light_5.0.0-0.7.515841
~ #

Same problem here, and I can't use update manager to apply as I have one host 😕

Excellent, worked perfectly. Thank you.

Strange, while:

vicfg-hostops --server=SERVERNAME --username=root --operation info

shows my host and its configuration

does

vicfg-hostops --server=SERVERNAME --username=root --operation enter

put my vMA in suspended state (instead of putting my Host in Maintenance Mode).

Interesting. Thank you.

I want to ask. Are the patches cumulative or I should download and install all of them?

For example:

ESXi500-201206001

ESXi500-201205001

update-from-esxi5.0-5.0_update01

ESXi500-201112001

Thank you

They are cumulative, but there are some caveats to be aware of. Read the following blog entry's comments sections for a better understanding:
http://blogs.vmware.com/vsphere/2012/02/understanding-esxi-patches-finding-patches.html

Silly question, but are the patches cumulative? I just downloaded  the ESXi500-201207001 patch, but I haven't installed it yet as I don't know whether I should install it, or install earlier patches first. My ESXi build is 5.0.0 623860.

hi ACORit,

It is cummulative and you don't have to install previous patches. I've tried it and it will say that the patches have been installed.

3 years later your post is still applicable. thanks Smiley Happy (esxi v5.5)

Version history
Revision #:
1 of 1
Last update:
‎09-15-2011 08:52 AM
Updated by: