To integrate an extension with the vCenter Extension vService, you must add a section to the Open Virtualization Format (OVF) descriptor file that contains the virtual machine.

Including a <vServiceDependencySection> element in the OVF descriptor file of the virtual machine informs vCenter Server that this virtual machine depends on the vCenter Extension vService.

When you deploy a virtual machine by using OVF, vCenter Server generates an OVF environment XML document for the virtual machine. The OVF environment is a secure one-way communication channel between vCenter Server and the guest OS of the virtual machine. To use this feature you must enable OVF environment transport in the OVF descriptor of your virtual machine. The vCenter Extension vService makes the OVF environment available to the virtual machine in an ISO image that it locates in the first CD-ROM drive of the virtual machine.

The vCenter Extension vService uses the OVF environment to pass connection parameters to the guest operating system in the virtual machine. The vCenter Extension vService adds a <vServiceEnvironmentSection> element to the OVF environment of the virtual machine. The <vServiceEnvironmentSection> element contains the following connection parameters that a script running within the guest operating system requires to register with vCenter Server as an extension.

  • Communication parameters that allow the virtual machine to make a secure connection to the vCenter Extension vService Guest API:
    • HTTPS URL to the vCenter Extension vService Guest API.
    • Authentication token that authenticates the virtual machine with the vCenter Extension vService.
    • SSL thumbprint of an X509 certificate that the vCenter Extension vService uses to establish a secure HTTPS connection with the virtual machine.
  • Communication parameters that allow the guest operating system to make a secure connection to vCenter Server:
    • IP address of the vCenter Server instance
    • SSL thumbprint of the X509 certificate that vCenter Server uses to make a secure HTTPS connection to the virtual machine
    • HTTP port on which the vCenter Server is reachable
    • HTTPS port on which the vCenter Server is reachable
    • Managed object reference of the virtual machine in vCenter Server
Important: The <vServiceEnvironmentSection> element contains sensitive data. Take special care within the guest operating system to prevent other users from accessing it. When the connection to vCenter Server is established, the guest operating system no longer needs the OVF environment so you should eject the CD-ROM. Ejecting the CD-ROM deletes the OVF environment from the datastore.

Prerequisites

You have developed an extension running in a virtual machine that you deliver using OVF.

Procedure

  1. Add a <vServiceDependencySection> element to the OVF descriptor file for the virtual machine.
    You nest the <vServiceDependencySection> element in the <VirtualSystem> element.
    <Envelope>
     [...]
     <VirtualSystem>
      [...]
      <vmw:vServiceDependencySection>
      </vmw:vServiceDependencySection>
      [...]
     </VirtualSystem>
     [...]
    </Envelope>
  2. Add the URLs to the standard OVF and VMware OVF schemas.
    <vmw:vServiceDependencySection xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
                                            xmlns:vmw="http://www.vmware.com/schema/ovf">
    </vmw:vServiceDependencySection>
  3. Set the ovf:required attribute.
    Option Description
    ovf:required="true" Users can only deploy the OVF on vCenter Server 5.x. Users cannot power on the virtual machine if it is not bound to the vCenter Extension vService.
    ovf:required="false" Users can deploy the OVF vCenter Server 4.x and 5.x, but the virtual machine only integrates with the vCenter Extension vService in vCenter Server 5.x.
    <vmw:vServiceDependencySection xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
                                            xmlns:vmw="http://www.vmware.com/schema/ovf"
                                            ovf:required="true"
                                            vmw:id="installation" >
    </vmw:vServiceDependencySection>
  4. Set the type of the dependency to com.vmware.vservice.extension, to bind the extension to the vCenter Extension vService.
    <vmw:vServiceDependencySection xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
                                            xmlns:vmw="http://www.vmware.com/schema/ovf"
                                            ovf:required="true"
                                            vmw:id="installation" >
       <Info>A vService dependency</ovf:Info>
       <vmw:Type>com.vmware.vservice.extension</vmw:Type>
    </vmw:vServiceDependencySection>
  5. Provide a name and a description for the vService dependency, that appears in vService Manager.
    <vmw:vServiceDependencySection xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
                                            xmlns:vmw="http://www.vmware.com/schema/ovf"
                                            ovf:required="true"
                                            vmw:id="installation" >
       <ovf:Info>A vService dependency</ovf:Info>
       <vmw:Type>com.vmware.vservice.extension</vmw:Type>
       <vmw:Name>dependency_name</vmw:Name> 
       <vmw:Description>dependency_description</vmw:Description>
       <vmw:Configuration />
    </vmw:vServiceDependencySection>
  6. Enable OVF environment transport by setting the ovf:transport attribute of the <VirtualHardwareSection> element to iso.
    <Envelope>
     [...]
     <VirtualSystem>
      [...]
      <VirtualHardwareSection ovf:transport="iso">
        [...]  
      </VirtualHardwareSection>
      [...]
     </VirtualSystem>
     [...]
    </Envelope>

Results

You configured the OVF file for a extension to bind the extension to the vCenter Extension vService and to make the connection information for the vCenter Server instance available over OVF transport.

Example: vService dependency section in the OVF descriptor file

The following code extract shows an example of a <vServiceDependencySection> element in an OVF descriptor file.

<vmw:vServiceDependencySection xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
                                        xmlns:vmw="http://www.vmware.com/schema/ovf"
                                        ovf:required="true"
                                        vmw:id="installation" >
   <Info>A vService dependency</Info>
   <vmw:Type>com.vmware.vservice.extension</vmw:Type>
   <vmw:Name>vCenter Extension Installation</vmw:Name> 
   <vmw:Description>
        This appliance requires a binding to the vCenter Extension vService,
        which allows it to register automatically as a vCenter Extension at runtime.
   </vmw:Description>
   <vmw:Configuration />
</vmw:vServiceDependencySection>