Tag Archives: HP

Including the HP Offline Bundle as part of an upgrade to ESXi 4.1 U2

If you’re running your vSphere deployment on HP kit then there’s a pretty good chance you use the HP Customized ISO Image for installation, for example this one for ESXi 4.1 U1. These customised images typically contain HP management tools and drivers and are great for saving time during the installation process. Naturally you will be upgrading ESXi at some point, but it’s important that you also keep the HP part up-to-date too. To accompany the release of ESXi 4.1 U2 there is a corresponding release of the HP Offline Bundle. The release notes for this version do not suggest any enhancements or bug fixes, only that it is the version that is supported with 4.1 U2.

Once you have downloaded the HP Offline Bundle, it is possible to deploy it via a number of methods. The installation notes suggest installing with the vihostupdate utility, however in this post I’m going to show how it can be installed via vCenter Update Manager.

1) First of all the HP Offline Bundle needs to be imported into the Update Manager Patch Repository. Navigate to the Patch Repositoy and select Import Patches.

2. Enter the path to the HP Offline Bundle. (Note: the GUI does not display the full path, just the filename)

3. The patches will then be uploaded to the Patch Repository.

4. Finally, finish off the wizard.

5. Once the HP Offline Bundle has been imported a Host Extension Patch Baseline needs to be created. Navigate to Baselines and Groups and create a new Baseline, with the type changed from the default Host Patch to Host Extension.

6. Select the Extension to add to the Baseline. The best thing to do here is enter HP into the search box to reduce the number of items to choose from.

7. On the final page confirm the HP Offline Bundle has been added.

Alternatively, once the HP Offline Bundle has been uploaded into the Patch Repository, it’s much easier to create this baseline via the vCenter Update Manger PowerCLI cmdlets. 🙂  Note that we need to use the Extension parameter since the baseline will be of type Host Extension.

New-PatchBaseline -Name "HP Offline Bundle for ESXi 4.1 U2 " -Description "HP Offline Bundle for ESXi 4.1 U2" -IncludePatch (Get-Patch -SearchPhrase "HP ESXi 4.1 Bundle 1.2-25") -TargetType Host -Static -Extension

The main advantage for me of deploying the HP Offline Bundle with Update Manager is that we can take advantage of Baseline Groups. As the name suggests Baseline Groups enable you to group together multiple and different types of baselines. Consequently in this instance we can place the ESXi and HP Offline Bundle upgrade into a Baseline Group and carry out the upgrade to 4.1 U2 in a single remediation task.

There are similar upgrade packages for ESXi 5 from HP, so this process could also be used for that upgrade.

Configuring HP EVA Recommended Settings for ESXi via PowerCLI

The HP Enterprise Virtual Array Family with VMware vSphere 4.0 , 4.1 AND 5.0 Configuration Best Practises Guide, available here, contains many recommendations for ESXi configuration. There are a number of recommended settings in this document to enhance the storage performance, a subset of which I have picked as appropriate for the environment and then needed to configure them on all ESXi hosts.

They can be implemented via PowerCLI and the below script demonstrates how these different types of settings can be configured. The most interesting one for me was setting the default Path Selection Policy to VMW_PSP_RR. The guide recommends you use the following command from the ESXi console:

esxcli nmp satp setdefaultpsp -satp VMW_SATP_ALUA -psp VMW_PSP_RR

With the introduction of the Get-ESXCLI cmdlet we can now carry out the equivalent from PowerCLI. Get-EsxCLI requires a direct connection to the ESXi host rather than from vCenter, so all the settings in this script are configured via a direct connection to the ESXi host

Warning: Before carrying out any of these types of changes make sure you talk to your Storage Adminstrator to confirm what is appropriate for your own environment. Other array vendors offer different recommendations so be sure to check their documentation for similar settings.

Implement HP Recommended Settings for EVA SAN

Implement HP Recommended Settings for EVA SAN

Name of the ESXi host to configure the settings on

PS C:\> ./Set-HPEVAESXiConfig.ps1 -Hostname ESX01

PS C:\> Get-Content ESXServers.txt | ./Set-HPEVAESXiConfig.ps1

Author: Jonathan Medd
Date: 21/12/2011

[Parameter(Position=0,Mandatory=$true,HelpMessage="Name of the ESXi host to configure the settings on",

begin {

Write-Host "Please enter credentials to connect to the ESXi hosts" -ForegroundColor:Yellow
$Credential = Get-Credential
$UserName = $Credential.GetNetworkCredential().UserName
$Password = $Credential.GetNetworkCredential().Password

process {

Connect-VIServer $Hostname -User $Username -Password $Password | Out-Null

Write-Host "Setting Disk.DiskMaxIOSize Advanced Option"
Set-VMHostAdvancedConfiguration -VMHost $Hostname -Name Disk.DiskMaxIOSize -Value 128 | Out-Null

Write-Host "Changing any LUNs with MultipathPolicy set to MostRecentlyUsed to be RoundRobin instead"
Get-ScsiLun -VmHost $Hostname -LunType "disk" | Where-Object {$_.MultipathPolicy –eq "MostRecentlyUsed"} | Set-ScsiLun -MultipathPolicy "RoundRobin" | Out-Null

Write-Host "Setting the default PSP to be VMW_PSP_RR"
$esxCli = Get-EsxCli –Server $Hostname
$esxCli.nmp.satp.setdefaultpsp("VMW_PSP_RR", "VMW_SATP_ALUA")

Write-Host "Disconnecting from Host"
$DefaultVIServer | Disconnect-VIServer -Confirm:$false


Working with the HPQ WMI Provider to find NIC Information on HP Proliant Servers

I recently had a task to query NIC information on a number of HP Proliant servers, this included the connected NIC speed, duplex settings and status of the configured HP Team. I initally looked at the WMI class Win32_NetworkAdapterConfiguration  which contains a lot of info around NIC configuration. Unfortunately, it does not include NIC speed or duplex settings.

Looking for alternatives, I discovered a script from Hugo Peeters which instead queried the registry key HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318} which looked like it would do the job. However, for some reason this works fine for HP rackmount servers, but blades do not appear to publish NIC info to that registry key so I needed to look for something else.

A colleague pointed me to the HPQ WMI Provider, which I had not seen before and there does not appear to be a lot of published info about either. It can be installed as part of the HP Proliant installation process and adds 800+ classes that can be queried via WMI –  a sample is shown below from the Root\HPQ Namespace:

In this instance, I was able to use the following classes to obtain the information I needed:


There is an absolute wealth of information stored in here, so I would encourage you to check it out if you work with Windows Server on HP systems. The script I put together puts together a basic report of some key NIC info, with the knowledge that there are never more than 4 NICs in a server being queried.

Note that I have used the parameter -ErrorAction Stop in the WMI queries, to enforce a terminating error to be generated if the WMI query fails. Without this, the error is non-terminating and does not get caught by the Catch statement.

$HP_EthernetTeam = Get-WmiObject -Namespace root\hpq -Class HP_EthernetTeam -ComputerName $ComputerName -ErrorAction Stop

Retrieve HP NIC Info from HPQ WMI Namespace

Retrieve HP NIC Info from HPQ WMI Namespace

.PARAMETER  ServersInputFile
Path to the file containing server names

.PARAMETER  OutputFile
Path to the csv file to output data to

PS C:\> Get-HPNICStatus.ps1 -ServersInputFile C:\Scripts\Servers.txt -OutputFile C:\Scripts\HPNICStatus.csv



[Parameter(Position=0,Mandatory=$true,HelpMessage="Path to the file containing server names")]

[Parameter(Position=1,Mandatory=$true,HelpMessage="Path to the csv file to output data to")]

$ComputerNames = Get-Content $ServersInputFile

# Allow conversion to MB/sec for NIC speed
$NICSpeedConversionConstant = 1000000

$myCol = @()

foreach ($ComputerName in $ComputerNames){

Write-Host "`n`n"
Write-Host "Querying NIC info on $ComputerName"

# Test for HPQ WMI Namespace and deal with a failure in catch statement
try {

$HP_EthernetTeam = Get-WmiObject -Namespace root\hpq -Class HP_EthernetTeam -ComputerName $ComputerName -ErrorAction Stop
$HP_EthernetPort = Get-WmiObject -Namespace root\hpq -Class HP_EthernetPort -ComputerName $ComputerName -ErrorAction Stop
$HP_WinEthLANEndpoint = Get-WmiObject -Namespace root\hpq -Class HP_WinEthLANEndpoint -ComputerName $ComputerName -ErrorAction Stop

Write-Host "Successful query on $ComputerName"

# Calculate Team Health Status based on WMI query result
switch ($HP_WinEthLANEndpoint.HealthState) {
"0" {$HPTeamStatus = "Unknown"; break}
"5" {$HPTeamStatus = "OK"; break}
"10" {$HPTeamStatus = "Degraded/Warning"; break}
"15" {$HPTeamStatus = "Minor Failure"; break}
"20" {$HPTeamStatus = "Major Failure"; break}
"25" {$HPTeamStatus = "Critical Failure"; break}
"30" {$HPTeamStatus = "Non-recoverable Error"; break}
default {$HPTeamStatus = "Unknown"}

# Check Ethernet Port Status
$EthernetPortHealthStateArray = @()

foreach ($EthernetPort in $HP_EthernetPort){

switch ($EthernetPort.HealthState) {
"0" {$EthernetPortHealthState = "Unknown"; break}
"5" {$EthernetPortHealthState = "OK"; break}
"10" {$EthernetPortHealthState = "Degraded/Warning"; break}
"15" {$EthernetPortHealthState = "Minor Failure"; break}
"20" {$EthernetPortHealthState = "Major Failure"; break}
"25" {$EthernetPortHealthState = "Critical Failure"; break}
"30" {$EthernetPortHealthState = "Non-recoverable Error"; break}
default {$EthernetPortHealthState = "Unknown"}

$EthernetPortHealthStateObject = "" | Select-Object EthernetPortName,EthernetPortHealthStatus
$EthernetPortHealthStateObject.EthernetPortName = $EthernetPort.Description
$EthernetPortHealthStateObject.EthernetPortHealthStatus = $EthernetPortHealthState
$EthernetPortHealthStateArray += $EthernetPortHealthStateObject


$MYObject = “” | Select-Object Servername,HPTeamName,HPTeamStatus,HPTeamSpeed,NIC1Description,NIC1Model,NIC1Speed,NIC1FullDuplex,NIC1HealthState,NIC2Description,NIC2Model,NIC2Speed,NIC2FullDuplex,NIC2HealthState,NIC3Description,NIC3Model,NIC3Speed,NIC3FullDuplex,NIC3HealthState,NIC4Description,NIC4Model,NIC4Speed,NIC4FullDuplex,NIC4HealthState
$MYObject.Servername = $ComputerName
$MYObject.HPTeamName = $HP_EthernetTeam.Description
$MYObject.HPTeamStatus = $HPTeamStatus
$MYObject.HPTeamSpeed = [string]($HP_EthernetTeam.Speed / $NICSpeedConversionConstant) + " MB/sec"
$MYObject.NIC1Description = $HP_EthernetPort[0].Description
$MYObject.NIC1Model = $HP_EthernetPort[0].Caption
$MYObject.NIC1Speed = [string]($HP_EthernetPort[0].Speed / $NICSpeedConversionConstant) + " MB/sec"
$MYObject.NIC1FullDuplex = $HP_EthernetPort[0].FullDuplex
$MYObject.NIC1HealthState = $EthernetPortHealthStateArray[0].EthernetPortHealthStatus
$MYObject.NIC2Description = $HP_EthernetPort[1].Description
$MYObject.NIC2Model = $HP_EthernetPort[1].Caption
$MYObject.NIC2Speed = [string]($HP_EthernetPort[1].Speed / $NICSpeedConversionConstant) + " MB/sec"
$MYObject.NIC2FullDuplex = $HP_EthernetPort[1].FullDuplex
$MYObject.NIC2HealthState = $EthernetPortHealthStateArray[1].EthernetPortHealthStatus
$MYObject.NIC3Description = $HP_EthernetPort[2].Description
$MYObject.NIC3Model = $HP_EthernetPort[2].Caption
$MYObject.NIC3Speed = if ($HP_EthernetPort[2].Speed -ne $null){[string]($HP_EthernetPort[2].Speed / $NICSpeedConversionConstant) + " MB/sec"}
$MYObject.NIC3FullDuplex = $HP_EthernetPort[2].FullDuplex
$MYObject.NIC3HealthState = $EthernetPortHealthStateArray[2].EthernetPortHealthStatus
$MYObject.NIC4Description = $HP_EthernetPort[3].Description
$MYObject.NIC4Model = $HP_EthernetPort[3].Caption
$MYObject.NIC4Speed = if ($HP_EthernetPort[3].Speed -ne $null){[string]($HP_EthernetPort[3].Speed / $NICSpeedConversionConstant) + " MB/sec"}
$MYObject.NIC4FullDuplex = $HP_EthernetPort[3].FullDuplex
$MYObject.NIC4HealthState = $EthernetPortHealthStateArray[3].EthernetPortHealthStatus
$myCol += $MYObject

# If WMI query fails
catch {

Write-Host "Unsuccessful query on $ComputerName"

$MYObject = “” | Select-Object Servername,HPTeamName,HPTeamStatus,HPTeamSpeed,NIC1Description,NIC1Model,NIC1Speed,NIC1FullDuplex,NIC1HealthState,NIC2Description,NIC2Model,NIC2Speed,NIC2FullDuplex,NIC2HealthState,NIC3Description,NIC3Model,NIC3Speed,NIC3FullDuplex,NIC3HealthState,NIC4Description,NIC4Model,NIC4Speed,NIC4FullDuplex,NIC4HealthState
$MYObject.Servername = $ComputerName
$MYObject.HPTeamName = "HPQ WMI is not installed or WMI query failed"
$MYObject.HPTeamStatus = "N/A"
$MYObject.HPTeamSpeed = "N/A"
$MYObject.NIC1Description = "N/A"
$MYObject.NIC1Model = "N/A"
$MYObject.NIC1Speed = "N/A"
$MYObject.NIC1FullDuplex = "N/A"
$MYObject.NIC1HealthState = "N/A"
$MYObject.NIC2Description = "N/A"
$MYObject.NIC2Model = "N/A"
$MYObject.NIC2Speed = "N/A"
$MYObject.NIC2FullDuplex = "N/A"
$MYObject.NIC2HealthState = "N/A"
$MYObject.NIC3Description = "N/A"
$MYObject.NIC3Model = "N/A"
$MYObject.NIC3Speed = "N/A"
$MYObject.NIC3FullDuplex = "N/A"
$MYObject.NIC3HealthState = "N/A"
$MYObject.NIC4Description = "N/A"
$MYObject.NIC4Model = "N/A"
$MYObject.NIC4Speed = "N/A"
$MYObject.NIC4FullDuplex = "N/A"
$MYObject.NIC4HealthState = "N/A"
$myCol += $MYObject

Clear-Variable HP_EthernetTeam,HP_EthernetPort,HP_WinEthLANEndpoint,HPTeamStatus,EthernetPortHealthStateArray,EthernetPortHealthStateObject,EthernetPortHealthStateArray


$myCol | Export-Csv $OutputFile -NoTypeInformation