A VDC template can specify configurations for an Edge Gateway and organization VDC network. Each time this kind of template is instantiated, the resulting organization VDC contains an Edge Gateway and routed network. An organization administrator can then configure Edge Gateway services and add routed or isolated organization VDC networks as needed.
- A Provider VDC
- A Provider VDC storage profile defined in that Provider VDC
- An external network available in that Provider VDC
- A network pool associated with that Provider VDC
Prerequisites
This operation is restricted to system administrators.
Create a VMWVdcTemplate request body. The procedure shown here adds routed networking capability to a template like the one created in Create a VDC Template.
Procedure
Results
The system creates the new 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 That Includes Routed Networking
This example extends the one in Create a VDC Template to create a VDC template that, when instantiated, adds a VDC that contains an Edge Gateway and a routed organization VDC network to the organization. An organization VDC that is created by instantiating this template has properties similar to the one created in Create an Organization VDC with Pay As You Go Reservation Allocation Model. The Edge Gateway and organization VDC network it contains are similar to the ones created in Create an Edge Gateway and Create an Organization VDC Network With a Routed Connection.
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:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="example-vdc-template"> <Description>Example AllocationVapp VDC Template with Gateway</Description> <vmext:TenantName>PayAsYouGo-VDCTemplate</vmext:TenantName> <vmext:TenantDescription>PayAsYouGo-VdcTemplate</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> <GatewayConfiguration> <Gateway name="theEdge"> <Description>Edge Gateway defined by VDC template</Description> <Configuration> <GatewayBackingConfig>compact</GatewayBackingConfig> <GatewayInterfaces> <GatewayInterface> <Name>uplink1</Name> <DisplayName>Uplink interface defined by VDC template</DisplayName> <Network href="https://vcloud.example.com/api/admin/network/297"/> <InterfaceType>uplink</InterfaceType> </GatewayInterface> </GatewayInterfaces> <HaEnabled>false</HaEnabled> <UseDefaultRouteForDnsRelay>false</UseDefaultRouteForDnsRelay> </Configuration> </Gateway> <Network name="RoutedOVDCNet"> <Description>Routed through an Edge Gateway</Description> <Configuration> <IpScopes> <IpScope> <IsInherited>false</IsInherited> <Gateway>192.168.0.1</Gateway> <Netmask>255.255.255.0</Netmask> <IpRanges> <IpRange> <StartAddress>192.168.0.100</StartAddress> <EndAddress>192.168.0.199</EndAddress> </IpRange> </IpRanges> </IpScope> </IpScopes> <FenceMode>natRouted</FenceMode> </Configuration> <IsShared>false</IsShared> </Network> </GatewayConfiguration> <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> <vmext:NetworkPoolReference href="https://vcloud.example.com/api/admin/extension/networkPool/313"/> <CpuAllocationMhz>2048</CpuAllocationMhz> <CpuLimitMhzPerVcpu>1000</CpuLimitMhzPerVcpu> <MemoryAllocationMB>2048</MemoryAllocationMB> <CpuGuaranteedPercentage>1</CpuGuaranteedPercentage> <MemoryGuaranteedPercentage>1</MemoryGuaranteedPercentage> </vmext:VdcTemplateSpecification> </vmext:VMWVdcTemplate>
The response is similar to the one shown in Create a VDC Template.