VMware {code} Community
ChetanSaundanka
Contributor
Contributor

Difference between host & hostMember fields in DVSSummary data object

In vSphere's object model a data object DVSSummary (Distributed Virtual

Switch summary info object), there are two fields - "host" &

"hostMember". According to the documentation

host - type: MoRef[] to HostSystem. Description:The hosts with vnics that connects to the switch.

hostMember - type: MoRef[] to HostSystem. Description: The name of the hosts that join the switch.

What is the exact difference between the two?

Reply
0 Kudos
2 Replies
lamw
Community Manager
Community Manager

Looking at the API reference documentation, there doesn't seem to be a difference. They both return back an array of HostSystem's that are connected to the dVS.

I would have though that hostMember might just contain a simple string array of the Host's that are part of the dVS without having to futher filter if you just wanted to know which hosts are connected, that would have been my guess.

What I do notice in my lab is that if you have a host that's connected to the dVS and you look at the MOB, hostMember seems to be populated but host is left unset. Could you also confirm? Perhaps only one of these will be set

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
ChetanSaundanka
Contributor
Contributor

Unfortunately I dont have my test bed setup ready yet, so I wont be able to confirm your observations right away.

After studying the API documentation further & going through other literature, I have some explanation on this -

It seems there are two ways in which 'HostSystem' can get connected to a DVS.

1. Through virtual uplink i.e. vmnics attached to DVS

2. Through existing vSwitches on 'HostSystem'.

When a 'HostSystem' connects to DVS through vmnics then they are reflected in 'host' property of DVSSummary & when its connected through exisitng vSwitch it shows in the 'hostMember' property. A property called 'backing' of 'DistributedVirtualSwitchHostMemberConfigSpec' of type'DistributedVirtualSwitchHostMemberBacking' (and its properties) seems to corroborate the explanation.

Appreciate if you can confirm whether the explanation is correct.

Reply
0 Kudos