Register VM operation


The Register VM operation adds an existing virtual machine (VM) to a folder.

The following table describes the elements for this request:

Adapter request elements for the Register VM operation

Element

Definition

Required

<operation-type>

Defines the type of the operation: Basic_VM

Yes

<operation-name>

Defines the name of the operation: Register_VM

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Note

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Note

If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user name that is specified in the configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional; required if <user-name> is specified

<parameters>

Contains the elements required to execute the operation

Yes

<folder>

Specifies the folder in which the VM is to be registered

Valid value: Any string

Yes

<path>

Specifies the datastore path to the VM

For example: \<datastoreName>\<containerName>/<VMXNameoOfVirtualMachine.vmx>

Valid value: Any string

Yes

<name>

Specifies the name to be assigned to the VM

If you do not specify <name>, the displayName configuration parameter of the VM is used.

Valid value: Any string

No

<as-template>

Specifies whether to mark the VM as a template

Valid values: true, false (default)

No

<resource-pool>

Specifies the resource pool to which the VM is to be attached

Valid value: Any string

Conditional; not required if the VM is imported as a template

<host-system>

Specifies the target host on which the VM runs

For a stand-alone host or a cluster with a Distributed Resource Scheduler (DRS), if you do not specify <host-system>, a default value that is compatible with the host system is used.

Set the <host-system> element if the VM is imported as a template.

Valid value: Any string

Conditional; required if the VM is imported as a template

The [expand] macro is a standalone macro and it cannot be used inline.

Sample adapter response for the Register VM operation

 


<vmware-infrastructure-response>
 <metadata>
   <status>success</status>
 </metadata>
 <RegisterVM_TaskResponse>
   <Task>task-2780</Task>
 </RegisterVM_TaskResponse>
</vmware-infrastructure-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*