Hi
Can you help me to remove some driver:
$esxiCLI = Get-EsxCli -VMHost $h -V2
$esxiCLI.device.driver.list.Invoke()
$Rep = @()
$Rep += $esxiCLI.system.module.list.Invoke() | sort Name | where name -Match 'qfle'
$Rep +=$esxiCLI.system.module.list.Invoke() | sort Name| where name -Match 'qflge'
$Rep +=$esxiCLI.system.module.list.Invoke() | sort Name | where name -Match 'bnx2'
$Rep | ft -AutoSize
$List = $esxiCLI.software.vib.get.Invoke()
$List | where Name -Match 'bnx' | select name
Thanks in advance for your help.
Jawad
Not too sure what exactly you are asking?
Do you want to remove those drivers from the ESXi node or from the output?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD
I want to remove them from ESXi node.
You can use the software vib remove command via the Get-EsxCli cmdlet.
Just like you did for the list command.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD
I have already removed them:
$targetargs2 = $esxcli.software.vib.remove.CreateArgs()
$targetargs2.vibname = "net-bnx2"
$esxcli.software.vib.remove.Invoke($targetargs2)
$targetargs2.vibname = "net-bnx2x"
$esxcli.software.vib.remove.Invoke($targetargs2)
$targetargs2.vibname = "scsi-bnx2fc"
$esxcli.software.vib.remove.Invoke($targetargs2)
$targetargs2.vibname = "scsi-bnx2i"
$esxcli.software.vib.remove.Invoke($targetargs2)
after remove:
$List = $esxiCLI.software.vib.get.Invoke()
$List | where Name -Match 'bnx' | select name
Name
----
bnxtnet
bnxtroce
But I can see them IsEnable=False and IsLoaded=False
$esxiCLI.system.module.list.Invoke() | sort Name | where name -Match 'bnx2'
IsEnabled IsLoaded Name
--------- -------- ----
true true qfle3
true true qfle3f
false false bnx2
false false bnx2fc
false false bnx2i
false false bnx2x
I want to remove them form list.
That is what I asked earlier.
And you answered "... from the ESXi node"
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD.
please let me know how can I remove them form List.
Thanks in advance.
Did you reboot the ESXi node after you removed the VIBs?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, two times.
Did you do the software vib remove with the parameters force and noliveinstall set to $true?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD
my script:
$h = Get-VMHost $vmHost*
if($h.Version -eq "6.5.0"){
$ServerState = $h.ConnectionState
if($ServerState -eq "Maintenance"){
$esxcli = $null
$esxcli = $h | Get-EsxCli -V2
$targetargs = $null
$targetargs2 = $null
$targetargs = $esxcli.system.module.set.CreateArgs()
$targetargs2 = $esxcli.software.vib.remove.CreateArgs()
$drivercheck = $null
$drivercheck = $esxcli.network.nic.list.Invoke() | ?{ ($_.Driver -like "bnx2x”)}
if($drivercheck -ne $null) {
Write-Host "Running on" $h.Name
$targetargs.enabled = $true
$targetargs.module = "qflge"
$esxcli.system.module.set.Invoke($targetargs)
$targetargs.module = "qfle3"
$esxcli.system.module.set.Invoke($targetargs)
$targetargs.enabled = $false
$targetargs.module = "bnx2"
$esxcli.system.module.set.Invoke($targetargs)
$targetargs.module = "bnx2i"
$esxcli.system.module.set.Invoke($targetargs)
$targetargs.module = "bnx2x"
$esxcli.system.module.set.Invoke($targetargs)
$targetargs.module = "bnx2fc"
$esxcli.system.module.set.Invoke($targetargs)
$targetargs2.maintenancemode = $true
$targetargs2.noliveinstall = $true
$targetargs2.vibname = "net-bnx2"
$esxcli.software.vib.remove.Invoke($targetargs2)
$targetargs2.vibname = "net-bnx2x"
$esxcli.software.vib.remove.Invoke($targetargs2)
$targetargs2.vibname = "scsi-bnx2fc"
$esxcli.software.vib.remove.Invoke($targetargs2)
$targetargs2.vibname = "scsi-bnx2i"
$esxcli.software.vib.remove.Invoke($targetargs2)
}
}
}
Yes, I have tried, same result.
I don't see where you used the force parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD
I could not find any parameter for force.
Regards
Jawad
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference