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
-
Create a com.vmware.vcenter.ovf.LibraryItemTypes.DeploymentTarget instance
to specify the deployment location of the virtual machine or vApp.
-
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.
- (Optional)
Retrieve information from the
descriptor file of the OVF template and use the information during the OVF
template deployment.
-
Call the deploy method on the
LibraryItem
service.
-
Verify the outcome of the deployment
operation.