Virtual App Clone V App Task

Virtual App Clone V App Task

Creates a clone of this vApp.

Any % (percent) character used in this name parameter must be escaped, unless it is used to start an escape sequence. Clients may also escape any other characters in this name parameter.

When invoking this method, the following privilege checks occur:

  • The privilege VApp.Clone is required on this vApp.
  • If the target is a resource pool, the privilege Resource.AssignVAppToPool is required on it.
  • If the target is a vApp, the privileges VApp.Clone and VApp.AssignVApp are required on it.

Additional privileges are required by the clone spec provided. See VAppCloneSpec for details.

Required privileges: VApp.Clone

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/VirtualApp/{moId}/CloneVApp_Task
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case VirtualApp/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
CloneVAppRequestType of type(s) application/json
Required
{
    "name": "string",
    "target": {
        "type": "string",
        "value": "string"
    },
    "spec": {
        "location": {
            "type": "string",
            "value": "string"
        },
        "host": {
            "type": "string",
            "value": "string"
        },
        "resourceSpec": {
            "entity": {
                "type": "string",
                "value": "string"
            },
            "changeVersion": "string",
            "lastModified": "string",
            "cpuAllocation": {
                "reservation": 0,
                "expandableReservation": false,
                "limit": 0,
                "shares": {
                    "shares": 0,
                    "level": "string"
                },
                "overheadLimit": 0
            },
            "memoryAllocation": {
                "reservation": 0,
                "expandableReservation": false,
                "limit": 0,
                "shares": {
                    "shares": 0,
                    "level": "string"
                },
                "overheadLimit": 0
            },
            "scaleDescendantsShares": "string"
        },
        "vmFolder": {
            "type": "string",
            "value": "string"
        },
        "networkMapping": [
            {
                "_typeName": "string",
                "source": {
                    "type": "string",
                    "value": "string"
                },
                "destination": {
                    "type": "string",
                    "value": "string"
                }
            }
        ],
        "property": [
            {
                "_typeName": "string",
                "key": "string",
                "value": "string"
            }
        ],
        "resourceMapping": [
            {
                "_typeName": "string",
                "source": {
                    "type": "string",
                    "value": "string"
                },
                "parent": {
                    "type": "string",
                    "value": "string"
                },
                "resourceSpec": {
                    "entity": {
                        "type": "string",
                        "value": "string"
                    },
                    "changeVersion": "string",
                    "lastModified": "string",
                    "cpuAllocation": {
                        "reservation": 0,
                        "expandableReservation": false,
                        "limit": 0,
                        "shares": {
                            "shares": 0,
                            "level": "string"
                        },
                        "overheadLimit": 0
                    },
                    "memoryAllocation": {
                        "reservation": 0,
                        "expandableReservation": false,
                        "limit": 0,
                        "shares": {
                            "shares": 0,
                            "level": "string"
                        },
                        "overheadLimit": 0
                    },
                    "scaleDescendantsShares": "string"
                },
                "location": {
                    "type": "string",
                    "value": "string"
                }
            }
        ],
        "provisioning": "string"
    }
}
string
name
Required

The name of the new vApp.

target
Required

Reference to an instance of the ResourcePool managed object.

spec
Required

Specification for a vApp cloning operation.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

InvalidPowerState: if the vApp is powered on.

TaskInProgress: if the vApp is busy.

NotSupported: if the operation is not supported by the current agent.

InvalidState: if the operation cannot be performed because of the vApp's current state. For example, if the virtual machine configuration information is not available, or if the vApp is running.

InvalidDatastore: if the operation cannot be performed on the target datastores.

FileFault: if there was an error accessing one of the virtual machine files.

VmConfigFault: if one of the virtual machines are not compatible with a destination host. Typically, a specific subclass of this exception is thrown, such as IDEDiskNotSupported.

MigrationFault: if it is not possible to migrate one of the virtual machines to the destination. This is typically due to hosts being incompatible, such as mismatch in network polices or access to networks and datastores. Typically, a more specific subclass is thrown.

InsufficientResourcesFault: if this operation would violate a resource usage policy.

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}

Virtual App Operations
POST
Virtual App Clone V App Task
POST
Virtual App Create Child VM Task
POST
Virtual App Create Resource Pool
POST
Virtual App Create V App
POST
Virtual App Destroy Task
POST
Virtual App Destroy Children
POST
Virtual App Export V App
GET
Virtual App Get Alarm Actions Enabled
GET
Virtual App Get Available Field
GET
Virtual App Get Child Configuration
GET
Virtual App Get Child Link
GET
Virtual App Get Config
GET
Virtual App Get Config Issue
GET
Virtual App Get Config Status
GET
Virtual App Get Custom Value
GET
Virtual App Get Datastore
GET
Virtual App Get Declared Alarm State
GET
Virtual App Get Disabled Method
GET
Virtual App Get Effective Role
GET
Virtual App Get Name
GET
Virtual App Get Namespace
GET
Virtual App Get Network
GET
Virtual App Get Overall Status
GET
Virtual App Get Owner
GET
Virtual App Get Parent
GET
Virtual App Get Parent Folder
GET
Virtual App Get Parent V App
GET
Virtual App Get Permission
GET
Virtual App Get Recent Task
GET
Virtual App Get Resource Pool
GET
Virtual App Get Runtime
GET
Virtual App Get Summary
GET
Virtual App Get Tag
GET
Virtual App Get Triggered Alarm State
GET
Virtual App Get Value
GET
Virtual App Get V App Config
GET
Virtual App Get Vm
POST
Virtual App Import V App
POST
Virtual App Move Into Resource Pool
POST
Virtual App Power Off V App Task
POST
Virtual App Power On V App Task
POST
Virtual App Query Resource Config Option
POST
Virtual App Refresh Runtime
POST
Virtual App Register Child VM Task
POST
Virtual App Reload
POST
Virtual App Rename Task
POST
Virtual App Set Custom Value
POST
Virtual App Suspend V App Task
POST
Virtual App Unregister V App Task
POST
Virtual App Update Child Resource Configuration
POST
Virtual App Update Config
POST
Virtual App Update Linked Children
POST
Virtual App Update V App Config