im trying to bind my vmkernel portgroups that i use for iscsi storage to the iscsi softwareadapter but im stuck..
My script as far it is:
$vs = New-VirtualSwitch -VMHost $vmHost -Name vSwitch3 -Nic vmnic2,vmnic5 -Mtu 9000
$vmk = New-VMHostNetworkAdapter -VMHost $vmHost -PortGroup "Storage 1" -VirtualSwitch $vs -IP storageip1 -SubnetMask 255.255.255.0
Get-VirtualPortGroup -VMHost $vmHost -Name "Storage 1" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicActive "vmnic2" | Set-NicTeamingPolicy -MakeNicUnused "vmnic5"
$vmk = New-VMHostNetworkAdapter -VMHost $vmHost -PortGroup "Storage 2" -VirtualSwitch $vs -IP storageip2 -SubnetMask 255.255.255.0
Get-VirtualPortGroup -VMHost $vmHost -Name "Storage 2" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicActive "vmnic5" | Set-NicTeamingPolicy -MakeNicUnused "vmnic2"
Thanks in advance
i think i have a little understanding problem
Maybe ways changed how to configure esxi hosts to access iscsi storage.
I thought that you first have to create the virtual switch, than the vmkernel portgroup and after that bind the vmkernel portgroups for iscsi traffic to the iscsi softwareadapter.
In times where i used the service console the command was something like:
esxcli swiscsi nic add -n vmk0 -d vmhba33
And after that step i could configure the iscsi targets, things changed?
i tryied following command:
$hba = Get-VMHost $vmHost | Get-VMHostHba -Type "iScsi"
New-IScsiHbaTarget -IScsiHba $hba -Address "Storagetargetip"
The result is that my esxi host crashes after a rescan of the hba, i think i did a bad mistake..
specify more details about your esx(i) hardware configuration, what is your goal software iSCSI, dependant hardware iscsi or hardware iSCSI.
Use this guide but you have to be very clear and should know what you are doing if you are planing for other than SOFTWARE ISCSI setup.