VM Related Interfaces

Get VM Guest Tools Info

GET/zstack/v1/vm-instances/{uuid}/guest-tools-infos

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/5ecc83bf3f5033b9b78b4f9406c01f8f/guest-tools-infos

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlResource UUID, uniquely identifies the resource 3.7.0
systemTags (Optional)ListquerySystem Tag 3.7.0
userTags (Optional)ListqueryUser Tag 3.7.0
  • ZSvirt supports recording the GuestTools version installed inside the Virtual Machine, comparing with the Host GuestTools ISO version to determine if an upgrade is needed, SystemTags adds GuestTools option.
  • Option format: GuestTools::TOOLS_VERSION. The initial value of TOOLS_VERSION is 1.0.0, and this value will change as the tool version advances.
  • For example: GuestTools::1.0.0
  • Additional information: This API is used to get the GuestTools version information and current running status inside the Virtual Machine. If there is a return value and the Virtual Machine currently does not have a GuestTools tag, the tag will be created; if there is a return value and it is different from the current GuestTools tag value of the Virtual Machine, the tag will be updated.

API Response

Response Example

{
  "version": "1.0.0",
  "status": "Running",
  "features": {
    "pvpanic": "enable"
  }
}
NameTypeDescriptionStarting Version
versionStringGuest Tools version3.7.0
statusStringGuest Tools running status3.7.0
featuresMapFeatures supported by Guest Tools and the status of feature modules4.2.0
successbooleanSuccess3.7.0
errorErrorCodeError code. If not null, the operation failed. When the operation succeeds, this field is null. For details, see error3.7.0

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier of the error, for example SYS.1000, HOST.10013.7.0
descriptionStringBrief description of the error3.7.0
detailsStringDetailed error information3.7.0
elaborationStringReserved field, defaults to null3.7.0
opaqueLinkedHashMapReserved field, defaults to null3.7.0
causeErrorCodeRoot cause. The error that triggered the current error. If there is no original error, this field is null3.7.0

SDK Examples

Java SDK

GetVmGuestToolsInfoAction action = new GetVmGuestToolsInfoAction();
action.uuid = "5ecc83bf3f5033b9b78b4f9406c01f8f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVmGuestToolsInfoAction.Result res = action.call();

Python SDK

GetVmGuestToolsInfoAction action = GetVmGuestToolsInfoAction()
action.uuid = "5ecc83bf3f5033b9b78b4f9406c01f8f"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmGuestToolsInfoAction.Result res = action.call()