Vcenter Ovf LibraryItem deploy

Vcenter Ovf LibraryItem deploy

Deploys an OVF package stored in content library to a newly created virtual machine or virtual appliance.

This operation deploys an OVF package which is stored in the library item specified by ovfLibraryItemId. It uses the deployment specification in deploymentSpec to deploy the OVF package to the location specified by target.

Returns an authorization error if you do not have all of the privileges described as follows:

  • Operation execution requires System.Read.
  • The resource com.vmware.content.library.Item referenced by the parameter ovfLibraryItemId requires System.Read.
  • The resource HostSystem referenced by the property Vcenter Ovf LibraryItem DeploymentTarget.host_id requires System.Read.
  • The resource Network referenced by the map value of property Vcenter Ovf LibraryItem ResourcePoolDeploymentSpec.network_mappings requires System.Read.
  • The resource StorageProfile referenced by the property Vcenter Ovf LibraryItem ResourcePoolDeploymentSpec.storage_profile_id requires System.Read.
  • The resource Datastore referenced by the property Vcenter Ovf LibraryItem ResourcePoolDeploymentSpec.default_datastore_id requires System.Read.
  • The resource ResourcePool referenced by the property Vcenter Ovf LibraryItem DeploymentTarget.resource_pool_id requires VApp.Import.
  • The resource Folder referenced by the property Vcenter Ovf LibraryItem DeploymentTarget.folder_id requires VApp.Import.
Request
URI
POST
https://{api_host}/api/vcenter/ovf/library-item/{ovfLibraryItemId}?action=deploy
COPY
Path Parameters
string
ovfLibraryItemId
Required

Identifier of the content library item containing the OVF package to be deployed.

The parameter must be an identifier for the resource type: com.vmware.content.library.Item.

Header Parameters
string
Client-Token
Optional

Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried.

If missing or null, the server will create a token.


Request Body

Request body for invoking operation: deploy

Show optional properties

{
    "target": {
        "resource_pool_id": "string"
    },
    "deployment_spec": "Vcenter Ovf LibraryItem ResourcePoolDeploymentSpec Object"
}
{
    "target": {
        "resource_pool_id": "string",
        "host_id": "string",
        "folder_id": "string"
    },
    "deployment_spec": "Vcenter Ovf LibraryItem ResourcePoolDeploymentSpec Object"
}
target
Required

The Vcenter Ovf LibraryItem DeploymentTarget schema describes the location (target) where a virtual machine or virtual appliance should be deployed. It is used in the deploy and filter operations. See POST /vcenter/ovf/library-item/{ovfLibraryItemId}?action=deploy and POST /vcenter/ovf/library-item/{ovfLibraryItemId}?action=filter.

deployment_spec
Required

The Vcenter Ovf LibraryItem ResourcePoolDeploymentSpec schema defines the deployment parameters that can be specified for the deploy operation where the deployment target is a resource pool. See POST /vcenter/ovf/library-item/{ovfLibraryItemId}?action=deploy.

Authentication
This operation uses the following authentication methods.
Responses
200

Information about the success or failure of the operation, along with the details of the result or failure.

Returns Vcenter Ovf LibraryItem DeploymentResult of type(s) application/json
"Vcenter Ovf LibraryItem DeploymentResult Object"
boolean
succeeded
Required

Whether the deploy operation completed successfully.

resource_id
Optional

Identifier of the deployed resource entity.

If missing or null, the deploy operation failed and Vcenter Ovf LibraryItem DeploymentResult.error will describe the error(s) that caused the failure.

error
Optional

Errors, warnings, and informational messages produced by the deploy operation.

If missing or null, no errors, warnings, or informational messages were reported by the deploy operation.


400

if target contains invalid arguments.

if deploymentSpec contains invalid arguments or has properties that are inconsistent with target.

Returns Vapi Std Errors InvalidArgument of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors InvalidArgument0
"Vapi Std Errors InvalidArgument Object"

403

if you do not have all of the privileges described as follows :

  • Operation execution requires VirtualMachine.Config.AddNewDisk if the OVF descriptor has a disk drive (type 17) section.
  • Operation execution requires VirtualMachine.Config.AdvancedConfig if the OVF descriptor has an ExtraConfig section.
  • Operation execution requires Extension.Register for specified resource group if the OVF descriptor has a vServiceDependency section.
  • Operation execution requires Network.Assign for target network if specified.
  • Operation execution requires Datastore.AllocateSpace for target datastore if specified.
Returns Vapi Std Errors Unauthorized of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors Unauthorized0
"Vapi Std Errors Unauthorized Object"

404

if the library item specified by ovfLibraryItemId does not exist.

if any resource specified by a property of the Vcenter Ovf LibraryItem DeploymentTarget schema, specified by target, does not exist.

Returns Vapi Std Errors NotFound of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors NotFound0
"Vapi Std Errors NotFound Object"

500

if there was an error accessing the OVF package stored in the library item specified by ovfLibraryItemId.

Returns Vapi Std Errors ResourceInaccessible of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors ResourceInaccessible0
"Vapi Std Errors ResourceInaccessible Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"deployment_spec":"{}","target:"object"}' https://{api_host}/api/vcenter/ovf/library-item/{ovfLibraryItemId}?action=deploy