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.
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
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.
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
.
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>