Import A Virtual Machine As A Vapp Template - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide

Import a Virtual Machine as a vApp Template

The workflow to import a virtual machine as a vApp template is similar. As shown in Example
request URL is the importVmAsVAppTemplate link in the VimServer response body. The request body is an 
ImportVmAsVAppTemplateParams element that can contain an optional reference to a catalog in which the 
template will be entered after the import is complete. The response is an unresolved vAppTemplate body 
containing a task that tracks the import.
Example 7-33. Import a Virtual Machine as a vApp Template
Request:
POST http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/importVmAsVappTemplate
Content-type: application/vnd.vmware.admin.importVmAsVAppTemplateParams+xml
...
<ImportVmAsVAppTemplateParams xmlns="http://www.vmware.com/vcloud/extension/v1"
<VmMoRef>vm-642</VmMoRef>
<Vdc href="http://vcloud.example.com/api/v1.0/vdc/2"/>
<Catalog href="http://vcloud.example.com/api/v1.0/catalog/32"/>
</ImportVmAsVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate status="0" name="ImportedWin2K8-Template"
...
<Description/>
<Tasks>
<Task ... operation="Busy Virtual Application Template Win2K8" ...>
...
</Task>
</Tasks>
</VApp>
140
name="ImportedWin2K8-Template" sourceMove="false">
type="application/vnd.vmware.vcloud.vAppTemplate+xml"
href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-64" ...>
7‐33, the 
VMware, Inc.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VCLOUD API 1.0 - API and is the answer not in the manual?

Questions and answers

Table of Contents