Attach a vCenter Server Instance

You can register a vCenter Server instance for use in your cloud by making a POST request to the cloud’s action/registervimserver URL and supplying a RegisterVimServerParams request body. You can register the vCenter Server instance alone or together with an NSX Manager instance that is associated to this vCenter Server instance.

VMware Cloud Director uses resources from attached vCenter Server instances to back its provider VDCs. For network resources, the cloud can use NSX Data Center for vSphere, NSX-T Data Center, or both. If you want your cloud to use network resources from NSX Data Center for vSphere, you must register the vCenter Server instance together with its associated NSX Manager instance. For information about registering NSX-T Data Center with your cloud, see Register an NSX-T Manager Instance.

Starting with version 9.7, VMware Cloud Director can also act as an HTTP proxy server between tenants and software-defined data centers (SDDCs). An SDDC encapsulates the infrastructure of an attached vCenter Server instance. See Managing Dedicated vCenter Server Instances.

Note: By default, with an attached vCenter Server instance, you can create either a provider VDC or an SDDC. If you created a provider VDC backed by an vCenter Server instance, you cannot use this vCenter Server instance to create an SDDC, and the reverse. You can use modify the CPoM system settings of your VMware Cloud Director installation so that a vCenter Server instance can back both a provider VDC and an SDDC. See Retrieve or Update System Settings.

Prerequisites

  • This operation is restricted to system administrators.

  • Verify that you know the IP address and administrator credentials for the vCenter Server instance.
  • If you want to use NSX Data Center for vSphere, verify that an NSX Manager instance is associated with the vCenter Server instance and you know the IP address and administrator credentials for this NSX Manager instance.

Procedure

  1. Retrieve the XML representation of the extension objects and operations.
    For example, use the following request:
    GET https://vcloud.example.com/api/admin/extension
  2. In the response, locate the Link element that contains the URL for adding vCenter Server to the cloud.
    This element has a rel attribute value of add and a type attribute value of application/vnd.vmware.admin.registerVimServerParams+xml, for example:
    <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 instance and, optionally, an associated NSX Manager instance.
    1. In the VimServer element, provide information about the vCenter Server instance.
    2. If you want to register an associated NSX Manager instance, provide information in the ShieldManager element.
  4. POST the RegisterVimServerParams element that you created in Step 3 to the URL described in Step 2.

Example: Register a vCenter Server Instance with an Associated NSX Manager Instance

You must supply the user name and password of the vCenter Server administrator in the request. The response includes VMware Cloud Director URLs for the newly registered vCenter Server and NSX Manager instances, 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
      name="VSM-VC-22">
      <vmext:Username>Administrator</vmext:Username>
      <vmext:Password>Pa55w0rd</vmext:Password>
      <vmext:Url>https://10.100.121.66</vmext:Url>
   </vmext:ShieldManager>
</vmext:RegisterVimServerParams>
Response:
200 OK
Content-Type: application/vnd.vmware.admin.registerVimServerParams+xml
...
<vmext:RegisterVimServerParams
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">
   <vmext:VimServer
      type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
      name="VC-22"
      href="https://vcloud.example.com/api/admin/extension/vimServer/100">
      ...
   </vmext:VimServer>
   <vmext:ShieldManager
      ...
   </vmext:ShieldManager>
</vmext:RegisterVimServerParams>