1 Reply Latest reply on Nov 7, 2019 4:17 AM by yezdi

    How Do You Find The portgroupID for a Distributed Port Group

    RonWF Lurker

      I created a Distributed Port Group to link an ESG and a Load Balancer together.  However, in assigning vNICs on those devices to it I hit the bug described in https://kb.vmware.com/s/article/2151711.  The workaround is to use an API call to PUT the information needed to assign the IP address.  That would mean PUTting the following:

       

      <vnic>

            <label>vNic_4</label>

            <name>OBVIOUS_FAKE_NAME</name>

            <addressGroups>

                 <addressGroup>

                     <primaryAddress>1.2.3.4</primaryAddress>

                     <subnetMask>255.255.255.240</subnetMask>

                     <subnetPrefixLength>28</subnetPrefixLength>

                 </addressGroup>

              </addressGroups>

             <mtu>1500</mtu>

             <type>uplink</type>

             <isConnected>true</isConnected>

             <index>4</index>

             <portgroupId>dvportgroup-12345</portgroupId>

             <portgroupName>OBVIOUS_FAKE_GROUP_NAME</portgroupName>

             <enableProxyArp>false</enableProxyArp>

             <enableSendRedirects>true</enableSendRedirects>

          </vnic>

       

      I know the "portgroupName", but how do I determine the portgroupId?

        • 1. Re: How Do You Find The portgroupID for a Distributed Port Group
          yezdi Master
          vExpert

          the easiest option would be to extract the ID from vCenter Web Client (Flash) URL.

           

          Once you login to the Web client navigate to Networking > dvSwitch  and select the portgroup. You can find the portgroup ID from the URL.

           

           

          https://<vCenter IP or Name >/vsphere-client/?csp#extensionId%3Dvsphere.core.dvPortgroup.gettingStarted%3Bcontext%3Dcom.vmware.core.model%253A%253AServerObjectRef~a8cbf0d9-050a-411e-97c8-3e0fadaac22f%253ADistributedVirtualPortgroup%253Advportgroup-102~core

           

          ---------------------------------------------------------------------------------------------------------

          Was it helpful? Let us know by completing this short survey here.