Document navigation

GetVirtualizerInfo

API Request

URLs
GET zstack/v1/vm-instances/virtualizer-info
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/virtualizer-info? uuids=b5432fcc423434e7a5f5876f1fe1e910&uuids=67e54311bbef3b43b9c523b349b08ca9&uuids=d64aeea721f7331aa15e7fb95eee7390
Request Parameters
Name Type Location Description Valid Values Starting Version
uuids List query The host or the VM instance UUID. 4.6.21
systemTags List query Optional. The system tags. 4.6.21
userTags List query Optional. The user tags. 4.6.21

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "3ce46fb7eb2e369c88d5fd671d1c1694",
      "resourceType": "HostVO",
      "infoList": [
        {
          "hypervisor": "qemu-kvm",
          "currentVersion": "4.2.0-632.g6a6222b.el7",
          "expectVersion": "4.2.0-632.g6a6222b.el7",
          "matchState": "Matched"
        }
      ]
    },
    {
      "uuid": "5c10fab3f649380e9dce16bb22ffd572",
      "resourceType": "VmInstanceVO",
      "infoList": [
        {
          "hypervisor": "qemu-kvm",
          "currentVersion": "4.2.0-632.g6a6222b.el7",
          "expectVersion": "4.2.0-632.g6a6222b.el7",
          "matchState": "Matched"
        }
      ]
    },
    {
      "uuid": "78a8b78906233d57bce710e89b24ebc0",
      "resourceType": "VmInstanceVO",
      "infoList": [
        {
          "hypervisor": "qemu-kvm",
          "currentVersion": "4.2.0-632.g6a6222b.el7",
          "expectVersion": "4.2.0-632.g6a6222b.el7",
          "matchState": "Matched"
        }
      ]
    }
  ]
}
Name Type Description Starting Version
success boolean Whether the action is successful or not. 4.6.21
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.6.21
inventories List See inventories. 4.6.21
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 4.6.21
description String The brief description of the error. 4.6.21
details String The details about the error. 4.6.21
elaboration String The reserved field. Default value: null. 4.6.21
opaque LinkedHashMap The reserved field. Default value: null. 4.6.21
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 4.6.21
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 4.6.21
resourceType String The resource type. 4.6.21
error List Query errors. The value may be null. 4.6.21
infoList List See infoList. 4.6.21
#infoList
Name Type Description Satrting Version
hypervisor String The hypervisor. Generally, the value is qemu-kvm 4.6.21
currentVersion String The version of the hypervisor used by the VM instance or the host. 4.6.21
expectVersion String The expected hypervisor version. We recommend that you keep the hypervisor version of a VM instance consistent with that of the host it is running on and the hypervisor version of a host consistent with the MN recommended version. 4.6.21
matchState String Whether the current hypervisor version is consistent with the expected version. If the system cannot get the current version or the expected version, the value is Unknown here. 4.6.21

SDK Sample

Java SDK
GetVirtualizerInfoAction action = new GetVirtualizerInfoAction();
action.uuids = asList("b5432fcc423434e7a5f5876f1fe1e910","67e54311bbef3b43b9c523b349b08ca9","d64aeea721f7331aa15e7fb95eee7390");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVirtualizerInfoAction.Result res = action.call();
Python SDK
GetVirtualizerInfoAction action = GetVirtualizerInfoAction()
action.uuids = [b5432fcc423434e7a5f5876f1fe1e910, 67e54311bbef3b43b9c523b349b08ca9, d64aeea721f7331aa15e7fb95eee7390]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVirtualizerInfoAction.Result res = action.call()
API Reference | 5.5.30 | ZStack Cloud · ZCF | ZStack Resource Center