Migrate VM operation
The Migrate VM operation migrates a virtual machine's execution to a specific resource pool or host. If the {{<status>}} response element contains _success_, the {{<Task>}} response element contains the ID of the queued task, which you can use to obtain the task status.
The following table describes the elements for this request.
Adapter request elements for the Migrate VM operation
Element | Definition | Required |
---|---|---|
<operation-type> | Defines the type of operation: Advanced_Vm | Yes |
<operation-name> | Defines the name of operation: Migrate_VM | Yes |
<soap-url> | Specifies the URL for the remote SOAP service running on the VMware VirtualCenter | No |
<transport> | Specifies the transport protocol for the message | No |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | 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 |
<virtual-machine> | Contains the name of the virtual machine on which this operation is to be executed | Yes |
<resource-pool> | Specifies the resource pool for the virtual machine | Conditional; required if the host-system element is not specified. |
<host-system> | Specifies the DNS name of the target host on which the virtual machine runs | Conditional; required if the resource-pool element is not specified. |
<priority> | The priority of the migration task | Yes |
<state> | The power state of the virtual machine | No |
The following code sample shows a sample adapter request for the Migrate VM operation.
Sample adapter request for the Migrate VM operation
<operation-type>Advanced_Vm</operation-type>
<operation-name>Migrate_VM</operation-name>
<soap-url></soap-url>
<transport></transport>
<user-name></user-name>
<password></password>
<parameters>
<virtual-machine>win1</virtual-machine>
<resource-pool>TestRP</resource-pool>
<host-system>xyz.bmc.com</host-system>
<priority>defaultPriority</priority>
<state>poweredOff</state>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Migrate VM operation.
Sample adapter response for the Migrate VM operation
<metadata>
<status>success</status>
</metadata>
<MigrateVM_TaskResponse>
<Task>task-721</Task>
</MigrateVM_TaskResponse>
</vmware-infrastructure-response>
The following table describes the response element.
Adapter response element for the Migrate VM operation
Element | Definition |
---|---|
<Task> | Specifies the task ID of the submitted task |