VM Related Interfaces

Get VM vNUMA Topology

GET/zstack/v1/vm-instances/{uuid}/vnuma-topology

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/21529457e42c30f0a9b2a137915a0b28/vnuma-topology

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlVirtual Machine UUID 4.3.12

API Response

On success, this API returns an empty JSON structure {}. On error, the returned JSON structure contains an error field. For example:

{
  "hostUuid": "7fd86bbe6ca94a8d810aa1d33e29932c",
  "topology": [
    {
      "CPUsID": [
        "0",
        "1",
        "2",
        "3"
      ],
      "distance": [
        "10",
        "21"
      ],
      "nodeID": 0,
      "memSize": 1024,
      "phyNodeID": 0
    },
    {
      "CPUsID": [
        "4",
        "5",
        "6",
        "7"
      ],
      "distance": [
        "21",
        "10"
      ],
      "nodeID": 1,
      "memSize": 2048,
      "phyNodeID": 1
    }
  ],
  "name": "vm0",
  "uuid": "71b30db8bca34e9191ed09bff2990e80"
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. When the operation succeeds, this field is null. For details, see error4.3.12
nameStringVirtual Machine name4.3.12
uuidStringVirtual Machine UUID, uniquely identifies the resource4.3.12
hostUuidStringHost UUID where the Virtual Machine is located, uniquely identifies the resource4.3.12
topologyarray[json]vNUMA topology information, see topology4.3.12

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier of the error, for example SYS.1000, HOST.10014.3.12
descriptionStringBrief description of the error4.3.12
detailsStringDetailed error information4.3.12
elaborationStringReserved field, defaults to null4.3.12
opaqueLinkedHashMapReserved field, defaults to null4.3.12
causeErrorCodeRoot cause. The error that triggered the current error. If there is no original error, this field is null4.3.12

topology

NameTypeDescriptionStarting Version
nodeIDintvNUMA node ID4.3.12
CPUsIDarray[string]List of vCPU IDs included in vNUMA node4.3.12
phyNodeIDintHost NUMA node id4.3.12
distancearray[string]Distance information of VM vNUMA node4.3.12
memSizelongMemory size of VM vNUMA node (unit: B)4.3.12

SDK Examples

Java SDK

GetVmvNUMATopologyAction action = new GetVmvNUMATopologyAction()
action.uuid ="ff6d905e75d63e18ab0a9fc2ac14951c"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmvNUMATopologyAction.Result res = action.call()

Python SDK

GetVmvNUMATopologyAction action = new GetVmvNUMATopologyAction()
action.uuid ="ff6d905e75d63e18ab0a9fc2ac14951c"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmvNUMATopologyAction.Result res = action.call()