VMware, Inc. 63
Chapter 5 Datacenter Operations
Examinethetemplate’sovf:NetworkSectionelementtoseewhetheranynetworksaredefinedthere.If
thevApptemplateincludesanovf:Networkelement,thenameyouspecifyforthevAppnetworkmust
matchthenamespecifiedinthatelement’sovf:nameattribute.
See“A b o u t InstantiationParameters”onpage 62.
Verifythatyourorganization’s defaultleasesettingsareappropriateforthisvApp.Iftheyarenot,youcan
specifycustomleasesettingsaspartofinstantiation.
Example 5‐1showsaninstantiationrequestsimilartotheoneshowninExample 2‐6onpage 25,butincludes
anAllEULAsAcceptedelementthatdenotesacceptanceof
termsandconditionsembeddedinthechildVm
elements,andaLeaseSettingsSectionelementthatspecifiescustomdeploymentandstorageleaseterms
forthisvApp.ItalsospecifiesthatthevAppshouldbedeployedandpoweredonafteritisinstantiated.(If
youomitthedeployandpowerOnattributes,thedefault
valueoffalseisassumed.)
Example 5-1. Instantiating a vApp Template wIth Custom Lease Settings
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/instantiateVAppTemplate
Content-Type: application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml
...
<InstantiateVAppTemplateParams name="Linux FTP server" deploy=”true” powerOn=”true”
xmlns="http://www.vmware.com/vcloud/v1"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<Description>Example FTP Server</Description>
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for logical networks</ovf:Info>
<NetworkConfig networkName="vAppNetwork">
<Configuration>
<ParentNetwork href="http://vcloud.example.com/api/v1.0/network/54"/>
<FenceMode>bridged</FenceMode>
</Configuration>
</NetworkConfig>
</NetworkConfigSection>
<LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml">
<ovf:Info>Lease Settings</ovf:Info>
<StorageLeaseInSeconds>172800</StorageLeaseInSeconds>
<StorageLeaseExpiration>2010-04-11T08:08:16.438-07:00</StorageLeaseExpiration>
</LeaseSettingsSection>
</InstantiationParams>
<Source href=”http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-111”/>
<AllEULAsAccepted>true</AllEULAsAccepted>
</InstantiateVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vApp+xml
<VApp name="Linux FTP server" deployed=”false” status="0"
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7" ...>
<Description>Example FTP Server</Description>
...
<Tasks>
<Task ... operation="Creating Virtual Application Linux FTP server(7)" ... >
...
</Task>
</Tasks>
</VApp>