1.5
Table Of Contents
- vCloud API Programming Guide
- Contents
- vCloud API Programming Guide
- About the VMware vCloud API
- Hello vCloud: A Simplified RESTful Workflow
- Exploring a Cloud
- Provisioning an Organization with vApps, Templates, and Media
- Deploying and Operating vApps
- Summary of vCloud API vApp and Virtual Machine Operations Requests
- Create a vApp From a Template
- Compose a vApp From Existing Virtual Machines
- Recompose a vApp to Add or Remove Virtual Machines
- Operate a vApp
- Configuring vApps and Virtual Machines
- Retrieve the Configuration Links for a vApp
- Retrieve the Configuration Links for a Virtual Machine
- Retrieve or Update a Modifiable Section
- Update a vApp Network Configuration
- Update the NetworkConnectionSection of a Virtual Machine
- Retrieve or Modify the CPU Configuration of a Virtual Machine
- Retrieve or Modify the GuestCustomizationSection of a Virtual Machine
- Retrieve or Modify ProductSection Elements
- Retrieve or Modify Groups of Related Sections in a Virtual Machine
- Retrieve or Modify the Hard Disk Configuration of a Virtual Machine
- Creating, Provisioning, and Managing Organizations
- Summary of Administrative Requests
- Administrator Credentials and Privileges
- Organization Administration
- Network Administration
- vDC Administration
- Catalog Administration
- User and Group Administration
- Working With Roles and Rights
- Controlling Access to vApps and Catalogs
- Using vCloud API Extensions to Provision and Manage a Cloud
- Working With Object Metadata
- Using the Query Service
- Configuring and Using Blocking Tasks and Notifications
- XML Representations in the vCloud API
- Index
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