1.5

Table Of Contents
Import a Virtual Machine from vCenter
A system administrator can import virtual machines from the inventory of any vCenter server registered to
vCloud Director. You can import the virtual machines to any vDC in a cloud, and you can import them in
vApp or vApp template form.
When you import a virtual machine from vCenter, you must specify the following items:
n
A target vDC to receive the import
n
A form for the imported virtual machine to take. Choose vApp or vApp template.
n
Whether to remove the source virtual machine from vCenter inventory after the import is complete
Prerequisites
n
Verify that you are logged in as a system administrator.
n
Identify the virtual machine to import. See “Retrieve a List of Virtual Machines from a vCenter Server,”
on page 171.
Procedure
1 Choose whether to import the virtual machine as a vApp or vApp template.
The VimServer element that represents the vCenter server from which you import the virtual machine
contains two links that import virtual machines. One has the following form, and imports the virtual
machine as a vApp.
<vcloud:Link
rel="add"
type="application/vnd.vmware.admin.importVmAsVAppParams+xml"
href="https://vcloud.example.com/api/admin/extension/vimServer/9/importVmAsVApp" />
The other has the following form, and imports the virtual machine as a vApp template.
<vcloud:Link
rel="add"
type="application/vnd.vmware.admin.importVmAsVAppTemplateParams+xml"
href="https://vcloud.example.com/api/admin/extension/vimServer/9/importVmAsVAppTemplate" />
2 (Optional) If you plan to import the virtual machine as a vApp template, identify a catalog where you
want to place a reference to the template.
Import a Virtual Machine as a vApp
To import a virtual machine as a vApp, a system administrator can make a request to the importVmAsVApp link
of the VimServer that manages the virtual machine.
Prerequisites
n
Verify that you are logged in as a system administrator.
n
Identify the virtual machine to import. See “Retrieve a List of Virtual Machines from a vCenter Server,”
on page 171.
Procedure
1 Create an ImportVmAsVAppParams element that specifies the VmMoRef of the source virtual machine and a
target vDC to hold the imported vApp.
2 POST the ImportVmAsVAppParams element to the importVmAsVApp link of the source vCenter server.
Chapter 7 Using vCloud API Extensions to Provision and Manage a Cloud
VMware, Inc. 189