I am looking to pull the below details for each VMK, these are on distributed virtual switches which makes life a lot harder. I have most of the details mapped however still looking for the traffic flags as shown below.
The details i need are:
VMK id: esxi.config.network.vnic.net.device
network Label: can be derived from below portgroupkey
Ip Address: esxi.config.network.vnic.net.spec.ipAddress
vMotion traffic Enabled: Management Traffic Enabled: FT Logging Enabled:
And then from the vDS the uplinks
Can anyone point me in the right direction? or provide a cleaner way of gathering these details?
There is a bit of gymnastics involved to match traffic flags with vmk, but essentially "esx.config.virtualNicManagerInfo.netConfig" holds a list of with each "nicType":string and "selectedVnic":string that is assigned to it...
To marry this data up, i ended up looping threw each of the nicTypes to see if the current VMK i was gathering data about was listed in "selectedVnic":string and then assigning it the flag name in "nicType":string.
note, in each nicType it also holds a a list of possible "CandidateVnic" which holds all the data you can generate from esxi.config.network.vnic... this could be me miss-understanding the hierarchy in the network stack here... but it seems odd.
Let me know if anyone knows a cleaner way or wants this explained better