A system administrator can allocate resources from a provider VDC to a VDC in an organization by POSTing a CreateVdcParams element to an organization’s add URL for VDCs.

An organization virtual datacenter (organization VDC) is a deployment environment for virtual systems owned by the containing organization, and an allocation mechanism for resources such as networks, storage, CPU, and memory. In an organization VDC, computing resources are fully virtualized, and can be allocated based on demand, service level requirements, or a combination of the two. An organization virtual datacenter (organization VDC) is a deployment environment for virtual systems owned by the containing organization, and an allocation mechanism for resources such as networks, storage, CPU, and memory.

Prerequisites

  • This operation is restricted to system administrators.

  • Retrieve the list of network pools. Several types of organization VDC networks require the VDC to include a network pool, which you can specify when you create or update the VDC. See Retrieve a List of External Networks and Network Pools for information about how to retrieve this list.
  • If you want the new VDC to adopt specific resource pools, see Adopt Resource Pools With a VDC.

Procedure

  1. Retrieve the XML representation of the organization to which you want to add the VDC.
    Use a request like this one:
    GET https://vcloud.example.com/api/admin/org/26
  2. Examine the response to locate the Link element that contains the URL for adding VDCs to the organization.
    This element has a rel attribute value of add and a type attribute value of application/vnd.vmware.admin.createVdcParams+xml, as shown here:
    <Link
       href="https://vcloud.example.com/api/admin/org/26/vdcsparams"
       rel="add" 
       type="application/vnd.vmware.admin.createVdcParams+xml"/>
  3. Choose a provider VDC to supply resources for the new organization VDC
    1. Retrieve the XML representation of the VCloud object and examine the ProviderVdcReferences element it contains.
      The following request retrieves the representation of the VCloud object:
      GET https://vcloud.example.com/api/admin
      The VCloud element contains a ProviderVdcReferences element. Each provider VDC in the system is represented in that element by a ProviderVdcReference element, as shown here:
      <ProviderVdcReference
         type="application/vnd.vmware.admin.providervdc+xml"
         name="Main Provider"
         href="https://vcloud.example.com/api/admin/providervdc/2"/>
    2. (Optional) List the organization VDCs that each ProviderVdc supports.
      The following request retrieves the list of organization VDCs that .../providervdc/2 supports:
      GET https://vcloud.example.com/api/admin/providervdc/2/vdcReferences
      Taking this optional step can help you allocate ProviderVdc resources equitably across the organization VDCs in a cloud.
  4. Create a CreateVdcParams request body.
    1. Include an AllocationModel element that specifies how compute resources are allocated by this VDC.
      Choose one of the following values for AllocationModel:
      AllocationVApp
      Pay as you go. Resources are committed to the organization VDC only when vApps are created in it. When you use this allocation model, any Limit values you specify for Memory and CPU are ignored when you create a vApp and returned as 0 when you retrieve a vApp. Resources available to this kind of organization VDC can grow or shrink as needed when its provider VDC has multiple resource pools.
      AllocationPool
      Only a percentage of the resources you allocate are committed to the organization VDC
      ReservationPool
      All the resources you allocate are committed as a pool to the organization VDC. vApps in VDCs that support this allocation model can specify values for resources and limitations.
      Flex
      You can control the resource consumption at both the VDC and the individual virtual machine levels. The flex allocation model supports the capabilities of organization VDC compute policies. Flex allocation model supports all allocation configurations that are available in the other allocation models. When you use this allocation model, you include the IsElasticVDC and IncludeMemoryOverhead elements. If you want the VDC to be elastic, you must set the IsElasticVDC value to true. To include memory overhead into the tenant quota, you must set the IncludeMemoryOverhead value to true.
      Note: If you choose AllocationPool or ReservationPool, you can also include an OverCommitAllowed element in the CreateVdcParams request. Setting its value to false prevents creation of the VDC if the ComputeCapacity you specified is greater than what the backing Provider VDC can supply.
    2. Include at least one VdcStorageProfile element that specifies a ProviderVdcStorageProfile defined in the Provider VDC you chose in Step 3.
    3. Include a NetworkPoolReference element.
      The VDC must include a network pool if you want to create routed or isolated networks in it.
    4. Include a ProviderVdcReference element that contains a reference to the Provider VDC you chose in Step 3.
  5. POST the CreateVdcParams request body to the organization's add link for vdcs.

Results

The server creates the new VDC in the specified organization and returns an AdminVdc element that includes a set of Link elements that you can use to access, remove, or modify the new VDC. Users can reference this VDC using the URL specified in the href attribute in the Link where rel="alternate". See the response portion of Create an Organization VDC with Pay As You Go Reservation Allocation Model.

If the target organization already contains the maximum number of VDCs allowed by the system administrator, the request fails. A system administrator can change the VDC quota for an organization by updating the value of VdcQuota in the organization's GeneralOrgSettings.

Example: Create an Organization VDC with Pay As You Go Reservation Allocation Model

This example adds an AllocationvApp VDC to the organization created in Create an Organization. The new organization VDC is provisioned from the Provider VDC created in Create a Provider VDC, and includes a storage profile named Silver, which is backed by one of the storage profiles available in the Provider VDC. It also includes a network pool, so that it is capable of supporting routed and isolated organization VDC networks. See Retrieve a List of External Networks and Network Pools for information on how to find a NetworkPoolReference to use.

Request:
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="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" />
   <UsesFastProvisioning>true</UsesFastProvisioning>
</CreateVdcParams>

The response, a subset of which appears here, contains information extracted from the request, and includes a Task element that tracks creation of the VDC. The response also includes Link elements that enable administrative operations on the VDC, and a Capabilities element that lists the VMware virtual hardware architectures that the VDC supports. These elements are retrieved from the Provider VDC that you specified when you created the CreateVdcParams. While the VDC is under construction, its status remains 0.

Response:
201 Created
Content-Type: application/vnd.vmware.admin.vdc+xml
...
<AdminVdc
   xmlns="http://www.vmware.com/vcloud/v1.5"
   status="0"
   name="org26vdc1"
   id="urn:vcloud:vdc:44"
   type="application/vnd.vmware.admin.vdc+xml"
   href="https://vcloud.example.com/api/admin/vdc/44" ... >
   <Link
      rel="up"
      type="application/vnd.vmware.admin.organization+xml"
      href="https://vcloud.example.com/api/admin/org/26" />
   <Link
      rel="down"
      type="application/vnd.vmware.vcloud.metadata+xml"
      href="https://vcloud.example.com/api/admin/vdc/44/metadata" />
   <Link
      rel="alternate"
      type="application/vnd.vmware.vcloud.vdc+xml"
      href="https://vcloud.example.com/api/vdc/44" />
   <Link
      rel="down"
      type="application/vnd.vmware.admin.OrganizationVdcResourcePoolSet+xml"
      href="https://vcloud.example.com/api/admin/extension/vdc/44/resourcePools" />
   <Description>Example VDC</Description>
   ...
   <Tasks>
      <Task
         name="task"
         status="running"
         operation="Creating Virtual Datacenter org26vdc1(44)"
         ...
      </Task>
   </Tasks>
   <AllocationModel>AllocationVApp</AllocationModel>
   ...
   <Capabilities>
      <SupportedHardwareVersions>
         <SupportedHardwareVersion>vmx-04</SupportedHardwareVersion>
         <SupportedHardwareVersion>vmx-08</SupportedHardwareVersion>
      </SupportedHardwareVersions>
   </Capabilities>
   ...
</AdminVdc>

When construction is complete, the status changes to 1 and the Task is no longer included in representation. The following changes in the AdminVdc are also evident:

  • A reference to the vSphere resource pool that supports the VDC appears in a ResourcePoolRefs element and, for compatibility, in a VCloudExtension element.
  • There is an empty ResourceEntities element, because the VDC contains no Media, VAppTemplate, or Disk entities. For information about adding them, see Provisioning an Organization.
  • There is an empty AvailableNetworks element. To add networks to this organization VDC, see Create an Organization VDC Network.
  • Additional Link elements are included for operations that are now valid, but that were not valid while the VDC was under construction.
<AdminVdc
   xmlns="http://www.vmware.com/vcloud/v1.5"
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   status="1"
   name="org26vdc1"
   id="urn:vcloud:vdc:44"
   type="application/vnd.vmware.admin.vdc+xml"
   href="https://vcloud.example.com/api/admin/vdc/44" ... >
   <VCloudExtension
      required="false">
      <vmext:VimObjectRef>
         <vmext:VimServerRef
            type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
            name="vc1"
            href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
         <vmext:MoRef>resgroup-949</vmext:MoRef>
         <vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
      </vmext:VimObjectRef>
   </VCloudExtension>
     <Link
      rel="up"
      type="application/vnd.vmware.admin.organization+xml"
      href="https://vcloud.example.com/api/admin/org/e0b93bca-5dc2-453c-b3dc-bba8067d32b6" />
   <Link
      rel="edit"
      type="application/vnd.vmware.admin.vdc+xml"
      href="https://vcloud.example.com/api/admin/vdc/44" />
   <Link
      rel="disable"
      href="https://vcloud.example.com/api/admin/vdc/44/action/disable" />
   <Link
      rel="down"
      type="application/vnd.vmware.vcloud.metadata+xml"
      href="https://vcloud.example.com/api/admin/vdc/44/metadata" />
   <Link
      rel="alternate"
      type="application/vnd.vmware.vcloud.vdc+xml"
      href="https://vcloud.example.com/api/vdc/44" />
   <Link
      rel="add"
      type="application/vnd.vmware.admin.edgeGateway+xml"
      href="https://vcloud.example.com/api/admin/vdc/44/edgeGateways" />
   <Link
      rel="edgeGateways"
      type="application/vnd.vmware.vcloud.query.records+xml"
      href="https://vcloud.example.com/api/admin/vdc/44/edgeGateways" />
   <Link
      rel="add"
      type="application/vnd.vmware.vcloud.orgVdcNetwork+xml"
      href="https://vcloud.example.com/api/admin/vdc/44/networks" />
   <Link
      rel="orgVdcNetworks"
      type="application/vnd.vmware.vcloud.query.records+xml"
      href="https://vcloud.example.com/api/admin/vdc/44/networks" />
   <Link
      rel="down"
      type="application/vnd.vmware.admin.OrganizationVdcResourcePoolSet+xml"
      href="https://vcloud.example.com/api/admin/extension/vdc/44/resourcePools" />
   <Link
      rel="edit"
      type="application/vnd.vmware.admin.updateVdcStorageProfiles+xml"
      href="https://vcloud.example.com/api/admin/vdc/44/vdcStorageProfiles" />
   ...
   <ResourceEntities />
   <AvailableNetworks />
   ...
   <VdcStorageProfiles>
      <VdcStorageProfile
         type="application/vnd.vmware.admin.vdcStorageProfile+xml"
         name="Silver"
         href="https://vcloud.example.com/api/admin/vdcStorageProfile/158" />
   </VdcStorageProfiles>
   ...
   <ResourcePoolRefs>
       <vmext:VimObjectRef>
         <vmext:VimServerRef
            type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
            name="vc1"
            href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
         <vmext:MoRef>resgroup-949</vmext:MoRef>
         <vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
      </vmext:VimObjectRef>
    </ResourcePoolRefs>
</AdminVdc>