Deploy a Virtual Machine or vApp from an OVF Template in a Content Library

You can use the com.vmware.vcenter.ovf.LibraryItem service to deploy a virtual machine or vApp on a host, cluster, or resource pool from a library item.

Procedure

  1. Create a com.vmware.vcenter.ovf.LibraryItemTypes.DeploymentTarget instance to specify the deployment location of the virtual machine or vApp.
  2. Instantiate the com.vmware.vcenter.ovf.LibraryItemTypes.ResourcePoolDeploymentSpec class to define all necessary parameters for the deployment operation.
    For example, you can assign a name for the deployed virtual machine or vApp, and accept the End User License Agreements (EULAs) to complete the deployment successfully.
  3. (Optional) Retrieve information from the descriptor file of the OVF template and use the information during the OVF template deployment.
  4. Call the deploy method on the LibraryItem service.
  5. Verify the outcome of the deployment operation.