Disabling FCOE on vSphere 10gb NICs per VMware KB 2130092

So, we recently had an issue with some of our Dell blade vSphere hosts.  Seems they all crashed (PSOD) at the same time (6 nodes across 2 different clusters).  After submitting the log bundles and Dell TSRs, support recommended, along with upgrading drivers & firmware (the support go to!) that we remove FCoE from the NICs (as it’s not being used).  VMware said the FCoE messages in the logs was just “log spam” and not anything they felt would have caused any issues.  VMware’s conclusion was: it was a hardware issue.   We didn’t believe making these changes would FIX anything, however we decided to proceed to continue the troubleshooting.

They provided us VMware KB Article 2130092. The KB provides ESXCLI commands to run on each host that will remove the FCoE VIB and disable FCoE on the NIC (since we’re not using it), as well as remove a file, but if you know me at all… with more than 2 servers to do this on, I decided to script it.

Prerequisites:  plink.exe in the root of the C drive & an initial SSH connection to the hosts to accept the thumbprint. 


#########################################################
#
# PowerShell Script to remove the FCoE VIB & Disable FCoE
# Created by BLiebowitz on 5/25/2017
#
#########################################################

# Set variables
@vCenter = "vCenter Name"

# Connect to vCenter
connect-viserver $vCenter

# Identify Hosts in the cluster that require the update.  I decided to put the hosts into maintenance mode and that's how I identified the ones to run the script on.
foreach ($vmhost in (get-cluster "CLUSTER1" | Get-vmhost | where {$_.State -eq "Maintenance"})){
# Set ESXCLI variable
$ESXCLI = Get-vmhost $vmhost | Get-EsxCli
# Display if VIB is installed.
$ESXCLI.software.vib.list() | Select AcceptanceLevel,ID,InstallDate,Name,ReleaseDate,Status,Vendor,Version | Where {$_.Name -match "scsi-bnx2fc"}
# Find VIB
$FCoE = $esxcli.software.vib.list() | Where { $_.Name -like "scsi-bnx2fc"}
# Remove VIB
$FCoE | ForEach { $esxcli.software.vib.remove($null,$true,$false,$true,$_.Name)}

# Start SSH
$ssh = Get-VMHostService -vmhost $vmhost | Where {$_.Key -eq "TSM-SSH"}
Start-VMHostService -HostService ($ssh) -Confirm:$false

# Remove the 99bnx2fc.sh file.  I found this step wasn't necessary as the 3 hosts I ran this on, didn't have the file, but left it in just in case.
$User = "root"
$Pswd = "password"
$plink = "c:\plink.exe"

$plinkoptions = " -v -batch -pw $Pswd"
$cmd1 = 'rm /etc/rc.local.d/99bnx2fc.sh'

$remoteCommand = '"' + $cmd1 + '"'
$command = $plink + " " + $plinkoptions + " " + $User + "@" + $vmhost + " " + $remoteCommand

$msg = Invoke-Expression -command $command
$msg

# Stop SSH
Stop-VMHostService -HostService ($ssh) -Confirm:$false

# disable FCoE for 10gb VMNics (change this for your VMNIC #s that match your 10gb NICs)
$vmnic0 = 'vmnic0'
$vmnic1 = 'vmnic1'
$vmnic2 = 'vmnic2'
$vmnic3 = 'vmnic3'
$esxcli.fcoe.nic.disable($vmnic0)
$esxcli.fcoe.nic.disable($vmnic1)
$esxcli.fcoe.nic.disable($vmnic2)
$esxcli.fcoe.nic.disable($vmnic3)

}

# Disconnect from vCenter
disconnect-viserver $vCenter -confirm:$false

Hope someone else finds this useful. 🙂

Ben Liebowitz, VCP, vExpert
NJ VMUG Leader

*** UPDATE 6/27/2017 ***

We decided to disable FCOE on all the VMNICs and not just the ones we were using, so I modified the script. Remove the section “# disable FCoE for 10gb VMNics (change this for your VMNIC #s that match your 10gb NICs)” and replace it with the below section.  It’ll search for all VMNICs and attempt to disable FCOE.  You may get some blood splatter about NICs that don’t support FCOE, like the onboard NICs, but that’s expected.

 

# disable FCOE all the VMnics. # disable FCOE all the VMnics.
foreach ($vmnic in (get-vmhostnetworkadapter -vmhost $vmhost)) {
$nic = $vmnic.Name
$esxcli.fcoe.nic.disable($nic)
}

This should be the results afterwards.

Ben Liebowitz, VCP, vExpert
NJ VMUG Leader

Share This:

3 thoughts on “Disabling FCOE on vSphere 10gb NICs per VMware KB 2130092

  1. Hi Ben
    After almost a month can you say if this has made any difference? Curious minds need to know.

    Cheers
    Tyson Then, VCP, vExpert
    Melbourne VMUG Leader

    1. Tyson,

      We didn’t believe it was a solution to begin with. First they said it was because the logs filled up.. but for it to happen to 6 hosts simultaneously because of logs filling up? Not possible when the hosts all had different uptimes!

      Then they blamed it on outdated firmware and FCoE being on and not in use. I never had this problem in the past. But we turned it off to appease them so, if/when it happens again, we can say… Ok, now what?! 🙂

      1. I know this is an old post. Has anyone confirmed that this either fixed or did not fix the issue described?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.