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 Folder referenced by the map value of property Vcenter Ovf LibraryItem ResourcePoolDeploymentSpec.subnet_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://{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": {
        "accept_all_eula": false
    }
}
{
    "target": {
        "resource_pool_id": "string",
        "host_id": "string",
        "folder_id": "string"
    },
    "deployment_spec": {
        "name": "string",
        "annotation": "string",
        "accept_all_eula": false,
        "network_mappings": {
            "network_mappings": "string"
        },
        "subnet_mappings": {
            "subnet_mappings": "string"
        },
        "storage_mappings": {
            "storage_mappings": {
                "type": "string",
                "datastore_id": "string",
                "storage_profile_id": "string",
                "provisioning": "string"
            }
        },
        "storage_provisioning": "string",
        "storage_profile_id": "string",
        "locale": "string",
        "flags": [
            "string"
        ],
        "additional_parameters": [
            {
                "type": "string"
            }
        ],
        "default_datastore_id": "string",
        "vm_config_spec": {
            "provider": "string",
            "xml": "string"
        },
        "tag_params": {
            "tags": [
                {
                    "tag_id": "string",
                    "tag_name_spec": {
                        "tag_name": "string",
                        "category_name": "string"
                    }
                }
            ],
            "type": "string"
        }
    }
}
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
{
    "succeeded": false,
    "resource_id": {
        "type": "string",
        "id": "string"
    },
    "error": {
        "errors": [
            {
                "category": "string",
                "issues": [
                    {
                        "category": "string",
                        "file": "string",
                        "line_number": 0,
                        "column_number": 0,
                        "message": {
                            "id": "string",
                            "default_message": "string",
                            "args": [
                                "string"
                            ],
                            "params": {
                                "params": {
                                    "s": "string",
                                    "dt": "string",
                                    "i": 0,
                                    "d": "number",
                                    "l": {
                                        "id": "string",
                                        "params": {
                                            "params": "Vapi Std LocalizationParam Object"
                                        }
                                    },
                                    "format": "string",
                                    "precision": 0
                                }
                            },
                            "localized": "string"
                        }
                    }
                ],
                "name": "string",
                "value": "string",
                "message": {
                    "id": "string",
                    "default_message": "string",
                    "args": [
                        "string"
                    ],
                    "params": {
                        "params": {
                            "s": "string",
                            "dt": "string",
                            "i": 0,
                            "d": "number",
                            "l": "Vapi Std NestedLocalizableMessage Object",
                            "format": "string",
                            "precision": 0
                        }
                    },
                    "localized": "string"
                },
                "error": {
                    "messages": [
                        {
                            "id": "string",
                            "default_message": "string",
                            "args": [
                                "string"
                            ],
                            "params": {
                                "params": {
                                    "s": "string",
                                    "dt": "string",
                                    "i": 0,
                                    "d": "number",
                                    "l": "Vapi Std NestedLocalizableMessage Object",
                                    "format": "string",
                                    "precision": 0
                                }
                            },
                            "localized": "string"
                        }
                    ],
                    "data": {},
                    "error_type": "string"
                }
            }
        ],
        "warnings": [
            {
                "category": "string",
                "issues": [
                    {
                        "category": "string",
                        "file": "string",
                        "line_number": 0,
                        "column_number": 0,
                        "message": {
                            "id": "string",
                            "default_message": "string",
                            "args": [
                                "string"
                            ],
                            "params": {
                                "params": {
                                    "s": "string",
                                    "dt": "string",
                                    "i": 0,
                                    "d": "number",
                                    "l": "Vapi Std NestedLocalizableMessage Object",
                                    "format": "string",
                                    "precision": 0
                                }
                            },
                            "localized": "string"
                        }
                    }
                ],
                "name": "string",
                "value": "string",
                "message": {
                    "id": "string",
                    "default_message": "string",
                    "args": [
                        "string"
                    ],
                    "params": {
                        "params": {
                            "s": "string",
                            "dt": "string",
                            "i": 0,
                            "d": "number",
                            "l": "Vapi Std NestedLocalizableMessage Object",
                            "format": "string",
                            "precision": 0
                        }
                    },
                    "localized": "string"
                },
                "error": {
                    "messages": [
                        {
                            "id": "string",
                            "default_message": "string",
                            "args": [
                                "string"
                            ],
                            "params": {
                                "params": {
                                    "s": "string",
                                    "dt": "string",
                                    "i": 0,
                                    "d": "number",
                                    "l": "Vapi Std NestedLocalizableMessage Object",
                                    "format": "string",
                                    "precision": 0
                                }
                            },
                            "localized": "string"
                        }
                    ],
                    "data": {},
                    "error_type": "string"
                }
            }
        ],
        "information": [
            {
                "messages": [
                    {
                        "id": "string",
                        "default_message": "string",
                        "args": [
                            "string"
                        ],
                        "params": {
                            "params": {
                                "s": "string",
                                "dt": "string",
                                "i": 0,
                                "d": "number",
                                "l": "Vapi Std NestedLocalizableMessage Object",
                                "format": "string",
                                "precision": 0
                            }
                        },
                        "localized": "string"
                    }
                ]
            }
        ]
    }
}
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: Vapi Std Errors Error
{
    "messages": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": "Vapi Std NestedLocalizableMessage Object",
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string"
}

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: Vapi Std Errors Error
{
    "messages": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": "Vapi Std NestedLocalizableMessage Object",
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string",
    "challenge": "string"
}
string
challenge
Optional

Indicates the authentication challenges applicable to the target API provider. It can be used by a client to discover the correct authentication scheme to use. The exact syntax of the value is defined by the specific provider, the protocol and authentication schemes used.

For example, a provider using REST may adhere to the WWW-Authenticate HTTP header specification, RFC7235, section 4.1. In this case an example challenge value may be: SIGN realm="27da158-2ba4-11e9-b",sts="http://vcenter/sso?vsphere.local", Basic realm="vCenter"

This property was added in vSphere API 9.1.0.0.

This property is optional because it was added in a newer version than its parent node.


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: Vapi Std Errors Error
{
    "messages": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": "Vapi Std NestedLocalizableMessage Object",
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string"
}

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: Vapi Std Errors Error
{
    "messages": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": "Vapi Std NestedLocalizableMessage Object",
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string"
}

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