List all physical NIC’s driver and firmware information of all your ESXi 4.1 hosts using PowerCLI 4.1

Using the following script (an edited version of Julian Wood’s script), I was able to create a report of all firmware and drivers of the physical NICs in our ESXi hosts. Please note you need plink.exe because the info can only be extracted at the host level.

$ExportFilePath = “C:\HostVMNicsInfo.csv”
$PuttyUser = “root”
$PuttyPwd = “password”
$Plink = “D:\plink.exe”
$PlinkOptions = ” -v -pw $PuttyPwd”
$RCommand0 = “ethtool -i ”

$ESXHosts = Get-VMHost | Sort Name

$Report = @()
ForEach ($ESXHost in $ESXHosts) {
$pNics = $ESXHost | Get-VMHostNetworkAdapter -physical
ForEach ($pNic in $pNics) {
$Message = “”
$HostInfo = {} | Select HostName,ESXVersion,Cluster,pNic,DriverName,DriverVersion,DriverFirmware
$HostInfo.HostName = $ESXHost.Name
$HostInfo.ESXVersion = $ESXHost.Version
$HostInfo.Cluster = (Get-Cluster -VMHost $ESXHost.Name).Name
$HostInfo.pNic = $pNic.Name
Write-Host “Connecting to: ” $ESXHost.Name -ForegroundColor Green
$Command = $Plink + ” ” + $PlinkOptions + ” ” + $PuttyUser + “@” + $ESXHost.Name + ” ” + $RCommand0 + ” ” + $pNic.Name
$Message = Invoke-Expression -command $command
$HostInfo.DriverName = ($Message[0] -split “driver: “)[1]
$HostInfo.DriverVersion = ($Message[1] -split “version: “)[1]
$HostInfo.DriverFirmware = ($Message[2] -split “firmware-version: “)[1]
$Report += $HostInfo
}
}
$Report = $Report | Sort-Object HostName
IF ($Report -ne “”) {
$Report | Export-Csv $ExportFilePath -NoTypeInformation
}
Invoke-Item $ExportFilePath

To enable/disable the TSM-SSH service on each host, I used the excellent hostServiceManagement.pl script by William Lam from the vMA.

./hostServiceManagement.pl –server vc.your.domain –hostfile all_esxi_hosts –operation start –service TSM-SSH

./hostServiceManagement.pl –server vc.your.domain –hostfile all_esxi_hosts –operation stop –service TSM-SSH

Advertisements

Update the QLogic Fibre Channel HBA qla2xxx driver on your ESXi 4.0/4.1 host using the vMA

After updating the 553i 10Gb CNA a few weeks ago, it’s now time to update the FC HBA driver. The ESXi hosts I’m working with now, are version 4.1 Update 2 582267 and use QLogic based ISP2532 8Gb FC PCIe HBA’s.

To get the current driver version, log into the ESXi host and use the command

cat /proc/scsi/qla*/*

My current version is 831.k1.28.1-7vmw with firmware 5.03.06 (d5)

I downloaded the latest driver version  841.k1.34.1-1vmw here.

Extract the downloaded .iso and transfer the 841.k1.34.1-1vmw-offline_bundle-532021.zip to the vMA using eg. WinSCP. To update the ESXi host, use the command

vihostupdate -server [server name] -username root -password [password] -install -bundle 841.k1.34.1-1vmw-offline_bundle-532021.zip

Afterwards, reboot the ESXi host. In my case, I also updated the firmware, so there is also a new firmware version in the screenshot below.

Current version is now 841.k1.34.1-1vmw with firmware 5.06.02 (90d5)

Again, time for some testing =)

%d bloggers like this: