To create a portgroup-backed network pool, you create a VMWNetworkPool element whose type attribute has the value PortGroupPoolType, and POST the element to your cloud's add link for networkPools.

Verify that you are logged in to the vCloud API as a system administrator.

Verify that you know your cloud's add URL for networkPools. See Create a Network Pool.

Verify that at least one vCenter server attached to your cloud has network resources available. See Retrieve a List of Available Portgroups and Switches from a vCenter Server

1

Choose a vCenter server to provide a portgroup for the network pool.

2

Create a VMWNetworkPool element that specifies the properties of the network pool.

See the request portion of Example: Create a Portgroup-Backed Network Pool.

3

POST the VMWNetworkPool element you created in Step 2 to your cloud's add URL for networkPools. See Create a Network Pool.

See the request portion of Example: Create a Portgroup-Backed Network Pool.

Request:

POST https://vcloud.example.com/api/admin/extension/networkPools
Content-Type: application/vnd.vmware.admin.networkPool+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<vmext:VMWNetworkPool
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:type="vmext:PortGroupPoolType"
   name="example-portgroup-pool"
   type="application/vnd.vmware.admin.networkPool+xml">
   <vcloud:Description>Example portgroup-backed network pool</vcloud:Description>
   <vmext:PortGroupRefs>
      <vmext:VimObjectRef>
         <vmext:VimServerRef
            href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
         <vmext:MoRef>dvportgroup-32</vmext:MoRef>
         <vmext:VimObjectType>DV_PORTGROUP</vmext:VimObjectType>
      </vmext:VimObjectRef>
   </vmext:PortGroupRefs>
   <vmext:VimServer
      href="https://vcloud.example.com/api/admin/extension/vimServer/9"></vmext:VimServer>
</vmext:VMWNetworkPool>

The response includes a Task that tracks the creation of the network pool, and a set of Link elements that you can use to operate on or modify it.

Response:

201 Created
Content-Type: application/vnd.vmware.admin.networkPool+xml
...
<vmext:VMWNetworkPool
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:type="vmext:PortGroupPoolType"
   name="example-portgroup-pool"
   id="urn:vcloud:networkpool:66"
   type="application/vnd.vmware.admin.networkPool+xml"
   href="https://vcloud.example.com/api/admin/extension/networkPool/66" ... >
   <vcloud:Link
      rel="up"
      type="application/vnd.vmware.admin.vmwNetworkPoolReferences+xml"
      href="https://vcloud.example.com/api/admin/extension/networkPoolReferences" />
   <vcloud:Link
      rel="edit"
      type="application/vnd.vmware.admin.networkPool+xml"
      href="https://vcloud.example.com/api/admin/extension/networkPool/66" />
   <vcloud:Link
      rel="remove"
      href="https://vcloud.example.com/api/admin/extension/networkPool/66" />
   <vcloud:Description>Example portgroup-backed network pool</vcloud:Description>
   <vcloud:Tasks>
      <vcloud:Task
         status="running"
         ...
         operation="Creating Network Pool 66"
         ...
      </vcloud:Task>
   </vcloud:Tasks>
   ...
</vmext:VMWNetworkPool>