Capture A Vapp To Create A Vapp Template - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide
<ovf:StartupSection xmlns:vcloud="http://www.vmware.com/vcloud/v1"
<ovf:Info>VApp startup section</ovf:Info>
<ovf:Item ovf:order="0" ovf:id="CRM-DB"/>
<ovf:Item ovf:order="1" ovf:id="CRM-CRM"/>
</ovf:StartupSection>
</InstantiationParams>
<AllEULAsAccepted>true</AllEULAsAccepted>
<DeleteItem href="http://vcloud.example.com/api/v1.0/vApp/vm-45" />
</RecomposeVAppParams>
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ... operation="Updating Virtual Application Example Corp's CRM Appliance (33)" ...>
...
</Task>

Capture a vApp to Create a vApp Template

The captureVApp request creates a vApp template from an instantiated vApp. The request body, shown in 
Example
5‐8, is a captureVAppParams element that specifies the href of the vApp to capture, along with a 
name and optional description for the template that the capture creates.
N
   Before it can be captured, a vApp must be undeployed (deployed="false").
OTE
Example 5-8. Capture a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/captureVApp
Content-Type: application/vnd.vmware.vcloud.captureVAppParams+xml
...
<CaptureVAppParams name="Linux Server Template" xmlns="http://www.vmware.com/vcloud/v1">
<Description>Template captured from Ubuntu vApp</Description>
<Source href="http://vcloud.example.com/api/v1.0/vApp/vApp-201"/>
</CaptureVAppParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate name="Linux Server Template"" type="application/vnd.vmware.vcloud.vApp+xml"
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
<Description>Template captured from Ubuntu vApp</Description>
<Tasks>
<Task ... operation="Capturing Virtual Application Template CaturedTemplate (20)" ... >
...
</Task>
</Tasks>
...
</VAppTemplate>
The response is a vAppTemplate document that contains a Task. The status of the vAppTemplate is initially 
0. When the capture operation is complete, the status changes to 8.
68
vcloud:href="http://vcloud.example.com/api/v1.0/vApp/vapp-33/
startupSection/"
vcloud:type="application/vnd.vmware.vcloud.startupSection+xml">
status="8" href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-20"
...>
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents