1 person found this helpful
Here is a vSphere SDK for Perl script that may help you extract out the distributed portgroup for your virtual machines: getvSwitchMacTable.pl. I do have to say it's definitely not pretty and you may also want to take a look at this thread for a cleaner solution: Re: find_entity_view & DistributedVirtualSwitches which requires a manual update to the Perl client stubs to extract out information from a distributed vSwitch than having to do multiple nested calls.
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
If you find this information useful, please award points for "correct" or "helpful".
Thank you lamw.
I executed the script on my system.
But, the script seems like return not-definite portgroupName connected to guestNic.
I also see your sample execution on DOC-11581.
The sample execution listed 2 lines like this.
VM MAC PORTGROUP
vm-4 00:50:56:92:63:61 - VM Network
vm-4 00:50:56:92:63:61 - Internet.
It seems one vNic(00:50:56:92:63:61) connected two portgroup VM Network and Internet .
My execution listed same as this.
How can I definite the portgroupName connected to the guestNic ?