vSphere 6.5 & iSCSI binding bug – unused adapters

 In VMware

As I am playing with Vsphere 6.5 in my new lab I have encountered another strange behaviour today. It is related to multipath to iSCSI target.

If you check VMware documentations you will found this requirement

To enable vmknic-based software iSCSI multipathing, you must:

  • Create two VMkernel port groups and connect one uplink to each of them.
  • Bind each VMkernel network adapter to the software iSCSI adapter. Then run a rediscovery of iSCSI targets to detect multiple paths to them.

Well the point is that you cant do that in ESXi web client anymore. You can set the adapter unused but if you do that it won’t allow you to bind that vmkernel adapter to iSCSI HBA.


So my first thought was OK, its missing from the GUI so lets do that in esxcli.

Well there is not such an option at all either. Only active or unused.

[root@esxi1:~] esxcli network vswitch standard portgroup policy failover set --unused-uplinks=vmnic1 --portgroup-name=iSCSI1

Error: Invalid option --unused-uplinks

Usage: esxcli network vswitch standard portgroup policy failover set [cmd options]

Description:
set Configure the Failover policy for a port group. These setting may potentially override virtual switch settings.

Cmd options:
-a|--active-uplinks=<str>
Configure the list of active adapters and their failover order. This list must be a comma seperated list of values with the uplink
name and no spaces. Example: --active-uplinks=vmnic0,vmnic3,vmnic7,vmnic1
-b|--failback Configure whether a NIC will be used immediately when it comes back in service after a failover
-f|--failure-detection=<str>
Set the method of determining how a network outage is detected.
beacon: Detect failures based on active beaconing to the vswitch
link: Detect failures based on the NIC link state
-l|--load-balancing=<str>
Set the load balancing policy for this policy. This can be one of the following options:
explicit: Always use the highest order uplink from the list of active adapters which pass failover criteria.
iphash: Route based on hashing the src and destination IP addresses
mac: Route based on the MAC address of the packet source.
portid: Route based on the originating virtual port ID.
-n|--notify-switches Indicate whether to send a notification to physical switches on failover
-p|--portgroup-name=<str>
The name of the port group to set failover policy for. (required)
-s|--standby-uplinks=<str>
Configure the list of standby adapters and their failover order. This list must be a comma seperated list of values with the uplink
name and no spaces. Example: --standby-uplinks=vmnic2,vmnic4,vmnic8,vmnic6,vmnic11
-u|--use-vswitch Reset all values for this policy to use parent virtual switch's settings instead of overriding the settings for the port group.
Using this in conjunction with other settings will first reset all of the fields to use the virtual switch setting and then apply
the other options after the reset.

So what now? I really wants to continue my lab with vSphere 6.5 so lets find another solution.

You can actually specify which adapter is active by specifiing vmnic itself. It will move all other adapters to unused section.

First have a look at the current settings

[root@esxi1:~] esxcli network vswitch standard portgroup policy failover get -p iSCSI1
Load Balancing: srcport
Network Failure Detection: link
Notify Switches: true
Failback: true
Active Adapters: vmnic0
Standby Adapters: vmnic1
Unused Adapters:
Override Vswitch Load Balancing: false
Override Vswitch Network Failure Detection: false
Override Vswitch Notify Switches: false
Override Vswitch Failback: false
Override Vswitch Uplinks: true

As you can see vmnic0 is active while vmnic1 is standby

Let’s set vmnic1 as an active

[root@esxi1:~] esxcli network vswitch standard portgroup policy failover set -p iSCSI1 -a vmnic1
[root@esxi1:~] esxcli network vswitch standard portgroup policy failover get -p iSCSI1
Load Balancing: srcport
Network Failure Detection: link
Notify Switches: true
Failback: true
Active Adapters: vmnic1
Standby Adapters:
Unused Adapters: vmnic0
Override Vswitch Load Balancing: false
Override Vswitch Network Failure Detection: false
Override Vswitch Notify Switches: false
Override Vswitch Failback: false
Override Vswitch Uplinks: true

And now vice-versa to get desired result

[root@esxi1:~] esxcli network vswitch standard portgroup policy failover set -p iSCSI1 -a vmnic0
[root@esxi1:~] esxcli network vswitch standard portgroup policy failover get -p iSCSI1
Load Balancing: srcport
Network Failure Detection: link
Notify Switches: true
Failback: true
Active Adapters: vmnic0
Standby Adapters:
Unused Adapters: vmnic1
Override Vswitch Load Balancing: false
Override Vswitch Network Failure Detection: false
Override Vswitch Notify Switches: false
Override Vswitch Failback: false
Override Vswitch Uplinks: true

Woohooo, done. Now you can correctly bind this portgroup to iSCSI initiator as usuall.

I wonder whout would be the next issue I will run into with this new vShere 6.5 lab 🙂

Comments
  • Jules Field
    Reply

    In the latest vCenter the -p option you use doesn’t exist any more, you have to give it the -v (vSwitch name) instead. So there doesn’t seem to be a way of setting the policy for a portgroup, so iSCSI can’t be bound to it as both uplinks are active 🙁

Leave a Comment

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt