When adding a VDC to an organization, a system administrator can specify one or more resource pools that are available in the supporting Provider VDC. When the VDC is created, the specified resource pools are said to have been adopted by the VDC. Any vCenter VMs that exist in an adopted resource pool become available as discovered vApps in the new VDC.
When you create an organization VDC without specifying a resource pool, the system creates the VDC using the default resource pool of the specified Provider VDC. Before creating an organization VDC, you can query a Provider VDC to get a list of all resource pools that are candidates for adoption by the new VDC. If any resource pools contain VMs created in vCenter that your organization would like to access in a VDC, specify those pools when you create the VDC. vCenter VMs in the specified pools appear in the new VDC as discovered vApps and are candidates for adoption.
1 | Choose a provider VDC to supply resources for the new organization VDC |
2 | Retrieve the XML representation of the provider VDC you have chosen to back the new organization VDC. The VMWProvderVDC response body includes a Link of the following form: <Link rel="down" href="https://vcloud.example.com/api/admin/extension/providervdc/2/discoverResourcePools" type="application/vnd.vmware.admin.vmwDiscoveredResourcePools+xml"/>" |
3 | Retrieve the list of resource pools that are candidates for adoption by a VDC backed by the selected Provider VDC. Use the Link shown in Step 3 to make a request like this one: GET https://vcloud.example.com/api/admin/extension/providervdc/2/discoverResourcePools ... <?xml version="1.0" encoding="UTF-8"?> <vmext:VMWDiscoveredResourcePools xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"> <vmext:VMWDiscoveredResourcePool name="pvdc-1 (mapped as pVDC)" valideCandidate="false"> <vcloud:Link rel="down" href="https://vcloud.example.com/api/admin/extension/providervdc/35/discoverResourcePools/resgroup-80" type="application/vnd.vmware.admin.vmwDiscoveredResourcePools+xml" /> <vmext:ResourcePoolVimObjectRef> <vmext:VimServerRef href="https://vcloud.example.com/api/admin/extension/vimServer/3" name="vCenter System 1" type="application/vnd.vmware.admin.vmwvirtualcenter+xml" /> <vmext:MoRef>resgroup-80</vmext:MoRef> <vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType> </vmext:ResourcePoolVimObjectRef> </vmext:VMWDiscoveredResourcePool> </vmext:VMWDiscoveredResourcePools> |
4 | Create a CreateVdcParams request body. See the request portion of Example: Add a VDC With an Adopted Resource Pool to an Organization. |
5 | POST the CreateVdcParams request body to the organization's add link for vdcs. See the request portion of Example: Add a VDC With an Adopted Resource Pool to an Organization. |
This example modifies the request shown in Example: Create an Organization VDC to add a ResourcePoolRefs element that specifies the resource pool identified in Step 3.
POST https://vcloud.example.com/api/admin/org/26/vdcsparams Content-Type: application/vnd.vmware.admin.createVdcParams+xml ... <?xml version="1.0" encoding="UTF-8"?> <CreateVdcParams name="org26vdc1" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns="http://www.vmware.com/vcloud/v1.5"> <Description>Example VDC</Description> <AllocationModel>AllocationVApp</AllocationModel> <ComputeCapacity> <Cpu> <Units>MHz</Units> <Allocated>2048</Allocated> <Limit>2048</Limit> </Cpu> <Memory> <Units>MB</Units> <Allocated>2048</Allocated> <Limit>2048</Limit> </Memory> </ComputeCapacity> <NicQuota>0</NicQuota> <NetworkQuota>100</NetworkQuota> <VdcStorageProfile> <Enabled>true</Enabled> <Units>MB</Units> <Limit>20480</Limit> <Default>true</Default> <ProviderVdcStorageProfile href="https://vcloud.example.com/api/admin/pvdcStorageProfile/101" /> </VdcStorageProfile> <ResourceGuaranteedMemory>1</ResourceGuaranteedMemory> <ResourceGuaranteedCpu>1</ResourceGuaranteedCpu> <VCpuInMhz>2048</VCpuInMhz> <IsThinProvision>false</IsThinProvision> <NetworkPoolReference href="https://vcloud.example.com/api/admin/extension/networkPool/313"/> <ProviderVdcReference name="Main Provider" href="https://vcloud.example.com/api/admin/providervdc/35" /> <ResourcePoolRefs> <vmext:VimObjectRef > <vmext:VimServerRef href="https://vcloud.example.com/api/admin/extension/vimServer/36" name="VC" type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/> <vmext:MoRef>resgroup-70</vmext:MoRef> <vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType> </vmext:VimObjectRef> </ResourcePoolRefs> <UsesFastProvisioning>true</UsesFastProvisioning> </CreateVdcParams>