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
Attach a vCenter Server
A system administrator can register a vCenter server and a companion vShield Manager server for use in a
cloud by making a POST request to the cloud’s action/registervimserver URL and supplying a
RegisterVimServerParams request body
Prerequisites
n
Verify that you are logged in as a system administrator.
n
Verify that you know the name, IP address, and administrator password of the vCenter server and vShield
Manager server.
Procedure
1 Retrieve the XML representation of the vSphere platform extensions.
Use a request like this one.
GET https://vcloud.example.com/api/admin/extension
2 Examine the response to locate the Link element that contains the URL for adding vCenter servers to the
cloud.
This element has a rel attribute value of add and a type attribute value of
application/vnd.vmware.admin.registerVimServerParams+xml, as shown here:
<Link
type="application/vnd.vmware.admin.registerVimServerParams+xml"
rel="add"
href="https://vcloud.example.com/api/admin/extension/action/registervimserver"/>
3 Create a RegisterVimServerParams element that includes the information required to register the vCenter
server and vShield manager.
4 POST the RegisterVimServerParams element you created in Step 3 to the URL described in Step 2.
See the request portion of “Example: Register a vCenter Server and vShield Manager,” on page 166.
Example: Register a vCenter Server and vShield Manager
You must supply the user name and password of the vCenter administrator in the request. The response
includes vCloud URLs for the newly registered vCenter and vShield Manager servers, and omits the password.
Request:
POST https://vcloud.example.com/api/admin/extension/action/registervimserver
Content-Type: application/vnd.vmware.admin.registerVimServerParams+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<vmext:RegisterVimServerParams
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
<vmext:VimServer
name="VC-22">
<vmext:Username>Administrator</vmext:Username>
<vmext:Password>Pa55w0rd</vmext:Password>
<vmext:Url>https://10.100.121.123:443</vmext:Url>
<vmext:IsEnabled>false</vmext:IsEnabled>
</vmext:VimServer>
<vmext:ShieldManager
vCloud API Programming Guide
166 VMware, Inc.