To create a VDC template, POST a VMWVdcTemplate element to the system URL for adding VDC templates.
In its simplest form, a VDC template must include references to the following objects:
- A Provider VDC
- A Provider VDC storage profile defined in that Provider VDC
Prerequisites
This operation is restricted to system administrators.
Procedure
Results
The system creates the VDC template and returns a VMWVdcTemplate element that includes a set of Link elements that you can use to access, remove, or modify the new template.
Example: Create a VDC Template
This request creates a VDC template that, when instantiated, adds an AllocationVapp VDC to an organization. An organization VDC created by instantiating this template has many of the same properties as the one created in Create an Organization VDC with Pay As You Go Reservation Allocation Model.
Request:
POST https://vcloud.example.com/api/admin/extension/vdcTemplates Content-Type: application/vnd.vmware.admin.vmwVdcTemplate+xml <?xml version="1.0" encoding="UTF-8"?> <vmext:VMWVdcTemplate ... xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="example-vdc-template"> <Description>Example AllocationVapp VDC Template without Edge Gateway</Description> <vmext:TenantName>PayAsYouGo-VDCTemplate-no-net</vmext:TenantName> <vmext:TenantDescription>PayAsYouGo VDC with no networking</vmext:TenantDescription> <vmext:ProviderVdcReference href="https://vcloud.example.com/api/admin/providervdc/35" name="vCenter01" type="application/vnd.vmware.admin.providervdc+xml" /> <vmext:VdcTemplateSpecification xsi:type="vmext:VMWAllocationVappVdcTemplateSpecificationType"> <NicQuota>100</NicQuota> <VmQuota>50</VmQuota> <ProvisionedNetworkQuota>100</ProvisionedNetworkQuota> <StorageProfile name="Bronze"> <Enabled>true</Enabled> <Units>MB</Units> <Limit>2097152</Limit> <Default>true</Default> </StorageProfile> <vmext:ThinProvision>false</vmext:ThinProvision> <vmext:FastProvisioningEnabled>false</vmext:FastProvisioningEnabled> <CpuAllocationMhz>2048</CpuAllocationMhz> <CpuLimitMhzPerVcpu>1000</CpuLimitMhzPerVcpu> <MemoryAllocationMB>2048</MemoryAllocationMB> <CpuGuaranteedPercentage>1</CpuGuaranteedPercentage> <MemoryGuaranteedPercentage>1</MemoryGuaranteedPercentage> </vmext:VdcTemplateSpecification> </vmext:VMWVdcTemplate>
Response:
201 Created Content-Type: application/vnd.vmware.admin.vmwVdcTemplate+xml ... <?xml version="1.0" encoding="UTF-8"?> <vmext:VMWVdcTemplate 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" name="example-vdc-template" ...> <vcloud:Link rel="edit" href="https://vcloud.example.com/api/admin/extension/vdcTemplate/100" type="application/vnd.vmware.admin.vmwVdcTemplate+xml"/> <vcloud:Link rel="remove" href="https://vcloud.example.com/api/admin/extension/vdcTemplate/100"/> <vcloud:Link rel="down" href="https://vcloud.example.com/api/admin/extension/vdcTemplate/100/controlAccess/" type="application/vnd.vmware.vcloud.controlAccess+xml"/> <vcloud:Link rel="controlAccess" href="https://vcloud.example.com/api/admin/extension/vdcTemplate/100/action/controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml"/> <vcloud:Link rel="alternate" href="https://vcloud.example.com/api/vdcTemplate/100" type="application/vnd.vmware.admin.vdcTemplate+xml"/> <vcloud:Description>Example AllocationVapp VDC Template without Edge Gateway</vcloud:Description> <vmext:TenantName>PayAsYouGo-VDCTemplate-no-net</vmext:TenantName> <vmext:TenantDescription>PayAsYouGo VDC with no networking</vmext:TenantDescription> <vmext:ProviderVdcReference href="https://vcloud.example.com/api/admin/providervdc/35" name="pvdc" type="application/vnd.vmware.admin.providervdc+xml"/> <vmext:VdcTemplateSpecification xsi:type="vmext:VMWAllocationVappVdcTemplateSpecificationType"> ... </vmext:VdcTemplateSpecification> </vmext:VMWVdcTemplate>