VMware {code} Community
geajith
Contributor
Contributor

Binding with VMKernel network Adapter with the iSCSI Adapter

Hello,

I'm trying to automate the flow for connecting the iSCSI initiator with the corresponding target server. The VISDK API doesn’t seems to provide the support for automating the “Binding with VMKernel network Adapter with the iSCSI Adapter”.  However it supports the API for configuring the Dynamic discovery and Static discovery of iSCSI targets corresponding to the iSCSI Adapter.


Can anyone help me on this with SDK support for achieving this functionality.


Thanks,


Reply
0 Kudos
1 Reply
stripeyfish
Contributor
Contributor

Have just had to do this and after a lot of digging and coming across your 0 reply post!

Firstly I automated the set up a vSwitch with vmkernel portgroups each with single bound physical adapter.

Then enabled s.w iSCSI using UpdateSoftwareInternetScsiEnabled API

Once enabled, for my environment I set up iSCSI IQN required, and add targets

I then use QueryCandiateNics to look through devices I can use for binding. Up to you to filter through the list an return only the ones that comply as far as I can see.

It returns iSCSIPortInfo list.

From this list, extract the ones that comply - I just looked at portgroupname I know I have set up.

Then call BindVnic passing in the adapter name (e.g. vmhba41) and the iSCSIPortInfo.vnicDevice

et voila... my NICs were bound as if I had done it through the UI

Smiley Happy

Reply
0 Kudos