ESXi Patching in vSphere 5.0/5.1

By | 13th January 2013

Powercli can be used to create Image profiles and rules. This rules can be customized for specific server(as an example taking mac id)
Adding the bundle to the software depot.
C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> Add-EsxSoftwareDepot ‘C:Documents and SettingsAdministratorDesktopESXi500-XXXXXXX.zip ‘

Getting the image profile:This will list down the image profile of the Bundle that was added.
PowerCLI C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> Get-EsxImageProfile
Name                           Vendor          Last Modified          Acceptance Level
—-                                   ——               ————-                    —————-
ESXi-5.0.0-XXXX  .. VMware, Inc.    DD/MM/YYYY          PartnerSupported

Create a New rule based on the Mac ID of the nic in the machine.
C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> New-DeployRule -Name “Profile1″ -Item “ESXi-5.0.0-XXXXXX” -Pattern “mac=00:99:99:99:99:99″
Check whether the newly deploy rule is listed.
C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> Get-DeployRule
Name        : Profile1
PatternList : {mac=00:99:99:99:99:99}
ItemList    : {ESXi-5.0.0-XXXXXX}

Similarly you can deploy a new rule for another mac of a machine.
C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> New-DeployRule -Name “Profile2″ -Item “ESXi-5.0.0-XXXXXX” -Pattern “mac=00:88:88:88:88:88″
List the rule to see if both the Rules are available.
C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> Get-DeployRule
Name        : Profile1
PatternList : {mac=00:99:99:99:99:99}
ItemList    : {ESXi-5.0.0-XXXXXXX}
Name        : Profile2
PatternList : {mac=00:88:88:88:88:88}
ItemList    : {ESXi-5.0.0-XXXXXXX}

To deploy multiple machines with same Rule use Allhosts.
C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> New-DeployRule -Name “Profile2″ -Item “ESXi-5.0.0-XXXXXX” -AllHosts
When  multiple rules are there then change the order using index (say 0 – for the first one)
PowerCLI C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> Add-DeployRule -DeployRule Profile1 -At 0
vsphere 5 : Updating/Installing profile or vib using esxcli
05. May 2012 · Comments Off    · Categories: ESX/ESXi

An image profile defines an ESXi image and consists of VIBs. An image profile always includes a base VIB, and might include more VIBs.
A VIB is an ESXi software package. VMware and its partners package solutions, drivers, CIM providers, and applications that extend the ESXi platform as VIBs. VIBs are available in software depots. You can use VIBs to create and customize ISO images or to upgrade ESXi hosts by installing VIBs asynchronously onto the hosts.

(The  above definition’s have been taken from VMware vSphere 5 guide)

IMAGE PROFILE =========================================>

Getting the current Image profile in the host
~ # esxcli software profile get
ESXi-5.0.0-469512-standard
Name: ESXi-5.0.0-469512-standard
………

Finding the esx-base
~ # esxcli software vib list | grep -i esx-base
esx-base              5.0.0-0.0.469512                    VMware  VMwareCertified   2012-04-25
~ #

Listing the Image profiles in a depot.
This depot is creating using the bundle downloaded from the VMware website.

# esxcli software sources profile list -d http://192.168.10.12/esx50/
Name                              Vendor        Acceptance Level
——————————–  ————  —————-
ESXi-5.0.0-20120302001-standard   VMware, Inc.  PartnerSupported
ESXi-5.0.0-20120302001-no-tools   VMware, Inc.  PartnerSupported

Trying a dry-run (does not install) before the actual install. It helps to find what all will be installed in the system.
# esxcli software profile install -d http://192.168.10.12/esx50/ –dry-run -p ESXi-5.0.0-20120302001-standard
Installation Result
Message: Dryrun only, host not changed. The following installers will be applied: [BootBankInstaller, LockerInstaller]
Reboot Required: true
VIBs Installed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860, VMware_bootbank_esx-base_5.0.0-1.11.623860, VMware_bootbank_misc-drivers_5.0.0-1.11.623860, VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841, VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841, VMware_bootbank_net-e1000e_1.1.2-3vmw.500.1.11.623860, VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.1.11.623860, VMware_bootbank_sata-ahci_3.0-6vmw.500.1.11.623860, VMware_bootbank_sata-ata-piix_2.12-4vmw.500.1.11.623860, VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.1.11.623860, VMware_bootbank_scsi-megaraid-sas_5.34-1vmw.500.1.11.623860, VMware_bootbank_scsi-mpt2sas_06.00.00.00-6vmw.500.1.11.623860, VMware_bootbank_scsi-rste_2.0.2.0088-1vmw.500.1.11.623860, VMware_locker_tools-light_5.0.0-1.11.623860
VIBs Removed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.0.0.469512, VMware_bootbank_esx-base_5.0.0-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-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-nx-nic_4.0.557-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_scsi-aacraid_1.1.5.1-9vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid-sas_4.32-1vmw.500.0.0.469512, VMware_bootbank_scsi-mpt2sas_06.00.00.00-5vmw.500.0.0.469512, VMware_locker_tools-light_5.0.0-0.0.469512
VIBs Skipped:
/vmfs/volumes #

Installing the Image Profile using esxcli and reboot to system.
# esxcli software profile install -d http://192.168.10.12/esx50/ -p ESXi-5.0.0-20120302001-standard
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_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860, VMware_bootbank_esx-base_5.0.0-1.11.623860, VMware_bootbank_misc-drivers_5.0.0-1.11.623860, VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841, VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841, VMware_bootbank_net-e1000e_1.1.2-3vmw.500.1.11.623860, VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.1.11.623860, VMware_bootbank_sata-ahci_3.0-6vmw.500.1.11.623860, VMware_bootbank_sata-ata-piix_2.12-4vmw.500.1.11.623860, VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.1.11.623860, VMware_bootbank_scsi-megaraid-sas_5.34-1vmw.500.1.11.623860, VMware_bootbank_scsi-mpt2sas_06.00.00.00-6vmw.500.1.11.623860, VMware_bootbank_scsi-rste_2.0.2.0088-1vmw.500.1.11.623860, VMware_locker_tools-light_5.0.0-1.11.623860
VIBs Removed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.0.0.469512, VMware_bootbank_esx-base_5.0.0-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-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-nx-nic_4.0.557-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_scsi-aacraid_1.1.5.1-9vmw.500.0.0.469512, VMware_bootbank_scsi-megaraid-sas_4.32-1vmw.500.0.0.469512, VMware_bootbank_scsi-mpt2sas_06.00.00.00-5vmw.500.0.0.469512, VMware_locker_tools-light_5.0.0-0.0.469512
VIBs Skipped:

VIBS =================================================>

Using the vib installation method.

Get detail information of all the vibs installed on the machine.

~ # esxcli software vib get
VMware_locker_tools-light_5.0.0-1.11.623860
Name: tools-light
Version: 5.0.0-1.11.623860
Type: locker
Vendor: VMware
Acceptance Level: VMwareCertified
Summary: Updates the ESX 5.0.0 tools-light
Description: For build information, see KB  http://kb.vmware.com/kb/2010815
Release Date: 2012-02-17
Depends:
Conflicts:
Replaces:
Provides:
Maintenance Mode Required: False
Live Install Allowed: True
Live Remove Allowed: True
Stateless Ready: True

Listing of all the vibs installed in the machine
~ # esxcli software vib list
Installing a single vib using esxcli
~ # esxcli software vib install -n esx-base -d http://192.168.10.12/esx50/

Leave a Reply

Your email address will not be published. Required fields are marked *