GET/zstack/v1/vm-instances/{vmInstanceUuid}/migration-target-hosts Get the list of candidate Hosts for a Virtual Machine to migrate to.
Headers
Authorization: OAuth the-session-uuid
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth cf673ad3be454b49b24c4405f67531f0" \
-X GET http://localhost:8080/zstack/v1/vm-instances/98995eddf4854acc8b80da119fee81d5/migration-target-hosts
Parameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|
| vmInstanceUuid | String | url | Virtual Machine UUID | | 0.6 |
| systemTags (optional) | List | query | System Tags | | 0.6 |
| userTags (optional) | List | query | User Tags | | 0.6 |
Return Example
{
"inventories": [
{
"zoneUuid": "fe27a95b6eda315280dc875b014ab086",
"name": "example",
"uuid": "a4660c07fd0636e3949fd76a09cbe2a8",
"clusterUuid": "0f29f323e58c3cdbb41bbc83344e9c82",
"description": "example",
"managementIp": "192.168.0.1",
"hypervisorType": "KVM",
"state": "Enabled",
"status": "Connected",
"totalCpuCapacity": 4,
"availableCpuCapacity": 2,
"totalMemoryCapacity": 4,
"availableMemoryCapacity": 4,
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}
| Name | Type | Description | Starting Version |
|---|
| success | boolean | | 0.6 |
| error | ErrorCode | Error code. If not null, indicates operation failure. This field is null when the operation succeeds. See error | 0.6 |
| inventories | List | See inventories | 0.6 |
| Name | Type | Description | Starting Version |
|---|
| code | String | Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause, the source error that triggered the current error. If there is no original error, this field is null | 0.6 |
| Name | Type | Description | Starting Version |
|---|
| zoneUuid | String | Data Center UUID | 0.6 |
| name | String | Resource name | 0.6 |
| uuid | String | Resource UUID, uniquely identifies the resource | 0.6 |
| clusterUuid | String | Cluster UUID | 0.6 |
| description | String | Detailed description of the resource | 0.6 |
| managementIp | String | | 0.6 |
| hypervisorType | String | | 0.6 |
| state | String | | 0.6 |
| status | String | | 0.6 |
| totalCpuCapacity | Long | | 0.6 |
| availableCpuCapacity | Long | | 0.6 |
| cpuSockets | Integer | Number of physical CPU sockets | 0.6 |
| totalMemoryCapacity | Long | | 0.6 |
| availableMemoryCapacity | Long | | 0.6 |
| cpuNum | Integer | Number of logical CPUs | 0.6 |
| ipmiAddress | String | IPMI address | 0.6 |
| ipmiUsername | String | IPMI username | 0.6 |
| ipmiPort | Integer | IPMI port | 0.6 |
| ipmiPowerStatus | String | IPMI power status | 0.6 |
| architecture | String | | 0.6 |
| nqn | String | NVMe Qualified Name | 4.10.6 |
| hostname | String | Host name | 4.10.20 |
| createDate | Timestamp | Creation Time | 0.6 |
| lastOpDate | Timestamp | Last Operation Date | 0.6 |
| cpuStatus | HwMonitorStatus | See cpuStatus | 4.10.0 |
| memoryStatus | HwMonitorStatus | See memoryStatus | 4.10.0 |
| diskStatus | HwMonitorStatus | See diskStatus | 4.10.0 |
| nicStatus | HwMonitorStatus | See nicStatus | 4.10.0 |
| gpuStatus | HwMonitorStatus | See gpuStatus | 4.10.0 |
| powerSupplyStatus | HwMonitorStatus | See powerSupplyStatus | 4.10.0 |
| fanStatus | HwMonitorStatus | See fanStatus | 4.10.0 |
| raidStatus | HwMonitorStatus | See raidStatus | 4.10.0 |
| temperatureStatus | HwMonitorStatus | See temperatureStatus | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
| Name | Type | Description | Starting Version |
|---|
| Normal | HwMonitorStatus | Normal | 4.10.0 |
| Error | HwMonitorStatus | Error | 4.10.0 |
| Unknown | HwMonitorStatus | Unknown | 4.10.0 |
Java SDK
GetVmMigrationCandidateHostsAction action = new GetVmMigrationCandidateHostsAction();
action.vmInstanceUuid = "d7b73f96a95c3f6faa6f58360c980dcb";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVmMigrationCandidateHostsAction.Result res = action.call();
Python SDK
action = GetVmMigrationCandidateHostsAction()
action.vmInstanceUuid = "d7b73f96a95c3f6faa6f58360c980dcb"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()