Resource Pool Register Child VM Task

Resource Pool Register Child VM Task

Adds an existing virtual machine to this resource pool or vApp.

This operation only works for vApps or resource pools that are children of vApps. To register a VM in a folder, see RegisterVM_Task.

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. In addition to the VirtualMachine.Inventory.Register privilege, it requires System.Read privilege on the datastore that the existing virtual machine resides on.

Required privileges: VirtualMachine.Inventory.Register

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/ResourcePool/{moId}/RegisterChildVM_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 ResourcePool/{moId}.

string
release
Required

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


Request Body
RegisterChildVMRequestType of type(s) application/json
Required
{
    "path": "string",
    "name": "string",
    "host": {
        "type": "string",
        "value": "string"
    }
}
string
path
Required

A datastore path to the virtual machine. If the path ends with ".vmtx", indicating that it refers to a VM template, an InvalidArgument fault is thrown.

string
name
Optional

The name to be assigned to the virtual machine. If this parameter is not set, the displayName configuration parameter of the virtual machine is used. An entity name must be a non-empty string of less than 80 characters. The slash (/), backslash (\) and percent (%) will be escaped using the URL syntax. For example, %2F.

host
Optional

Reference to an instance of the HostSystem managed object.

Authentication
This operation uses the following authentication methods.
Responses
200

This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the newly registered VirtualMachine upon success.

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

500

NotSupported: if the operation is not supported. For example, if the operation is invoked on a resource pool that is unrelated to a vApp.

OutOfBounds: if the maximum number of VMs has been exceeded.

AlreadyExists: if the virtual machine is already registered.

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

NotFound: if the configuration file is not found on the system.

InvalidName: if the entity name is invalid.

InvalidArgument: if any of the arguments are invalid and a more specific fault type does not apply.

VmConfigFault: if the format / configuration of the virtual machine is invalid. Typically, a more specific fault is thrown such as InvalidFormat if the configuration file cannot be read, or InvalidDiskFormat if the disks cannot be read.

FileFault: if there is an error accessing the files on disk.

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"
        }
    ]
}

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