VM Related Interfaces

Get Virtualization Software Info

GET/zstack/v1/vm-instances/virtualizer-info

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/virtualizer-info? uuids=b5432fcc423434e7a5f5876f1fe1e910&uuids=67e54311bbef3b43b9c523b349b08ca9&uuids=d64aeea721f7331aa15e7fb95eee7390

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidsListqueryResource UUID, can be Virtual Machine or Host UUID 4.6.21
systemTags (optional)ListquerySystem Tags 4.6.21
userTags (optional)ListqueryUser Tags 4.6.21

API Response

Return Example

{
  "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"
        }
      ]
    }
  ]
}
NameTypeDescriptionStarting Version
successbooleanWhether the operation succeeded4.6.21
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error4.6.21
inventoriesListFor details, see inventories4.6.21

error

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

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID, a unique identifier for the resource4.6.21
resourceTypeStringResource Type4.6.21
errorListQuery errors that occurred, may be null4.6.21
infoListListFor details, see infoList4.6.21

infoList

NameTypeDescriptionStarting Version
hypervisorStringVirtualization software, typically qemu-kvm4.6.21
currentVersionStringCurrent virtualization software version used by the VM / Currently installed virtualization software version on the Host4.6.21
expectVersionStringExpected virtualization software version. If querying a VM, the expected version comes from the Host. If querying a Host, the expected version comes from the Management Node4.6.21
matchStateStringWhether the current virtualization software version matches the expected version. If either the current or expected version is not found, Unknown is returned4.6.21

SDK Examples

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()