Hi Experts,
I am trying to bind 2 vmkernal ports to iSCSI SW HBA. using powercli. ESXi v6.0, Powercli v6.5
I found 2 examples how to do it, but both don't work:
First way: Get-VMHost $VMhost | Set-VMHostiSCSIBinding -HBA $HBANumber -VMKernel $iSCSI_nic - it complain there is no Set-VMHostiSCSIBinding
The second way:
$esxcli = Get-EsxCli -V2 -VMhost $VMhost
$esxcli.iscsi.networkportal.add($HBA, $Null, $vmk1number)
or
#$esxcli.swiscsi.nic.add($HBANumber,$vmk1number)
It fails complaining "add" is not an option.
Any help is appreciated.
When you use the V2 switch on the Get-EsxCli cmdlet, the way of making the call is slightly different.
See also PowerCLI 6.3 R1: Get-ESXCLI Why the V2?
First do the following to get the layout of the hash table.
$esxcli.iscsi.networkportal.add.CreateArgs()
Then do the call (notice the Invoke that needs to be added).
$iScsi = @{
force = $false
nic = 'vmk0'
adapter = 'vmhba34'
}
$esxcli.iscsi.networkportal.add.Invoke($Iscsi)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
When you use the V2 switch on the Get-EsxCli cmdlet, the way of making the call is slightly different.
See also PowerCLI 6.3 R1: Get-ESXCLI Why the V2?
First do the following to get the layout of the hash table.
$esxcli.iscsi.networkportal.add.CreateArgs()
Then do the call (notice the Invoke that needs to be added).
$iScsi = @{
force = $false
nic = 'vmk0'
adapter = 'vmhba34'
}
$esxcli.iscsi.networkportal.add.Invoke($Iscsi)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you so much LucD! Work like a charm!