vCloud API Programming Guide
140
VMware, Inc.
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 7
‐
33
,
the
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.importVmAsVAppTemplatxml
...
<ImportVmAsVAppTemplateParams xmlns="http://www.vmware.com/vcloud/extension/v1"
name="ImportedWin2K8-Template" sourceMove="false">
<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.vAppTxml
...
<VAppTemplate status="0" name="ImportedWin2K8-Template"
type="application/vnd.vmware.vcloud.vAppTxml"
href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-64" ...>
...
<Description/>
<Tasks>
<Task ... operation=”Busy Virtual Application Template Win2K8” ...>
...
</Task>
</Tasks>
</VApp>
Содержание VCLOUD API 1.0 - TECHNICAL NOTE
Страница 10: ...vCloud API Programming Guide 10 VMware Inc...
Страница 20: ...vCloud API Programming Guide 20 VMware Inc...
Страница 32: ...vCloud API Programming Guide 32 VMware Inc...
Страница 90: ...vCloud API Programming Guide 90 VMware Inc...
Страница 150: ...vCloud API Programming Guide 150 VMware Inc...
Страница 170: ...vCloud API Programming Guide 170 VMware Inc...
Страница 202: ...vCloud API Programming Guide 202 VMware Inc...
Страница 212: ...vCloud API Programming Guide 212 VMware Inc...