GetVmGuestToolsInfo
API Request
URLs
GET zstack/v1/vm-instances/{uuid}/guest-tools-infosHeaders
Authorization: OAuth the-session-uuidCurl
Sample
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-infosRequest Parameters
Note:
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 3.7.0 | |
| systemTags | List | query | Optional. The system tags. | 3.7.0 | |
| userTags | List | query | Optional. The user tags. | 3.7.0 |
Note:
- ZStack Cloud records the
version of the GuestTools ISO installed in the VM instance, compares the
ISO version with that of the host, and then decides whether to upgrade
the GuestTools ISO. Note that you can add the GuestTools option
to SystemTags.
- Format of the GuestTools option:
GuestTools::TOOLS_VERSION. Here, the initial value of TOOLS_VERSION is 1.0.0. This value will change as the version of GuestTools is upgraded. - Example:
GuestTools::1.0.0 - Note: This API is used to obtain the version and running status of the GuestTools installed in the VM instance. If the requested information is returned but the VM instance does not have a GuestTools tag, then a GuestTools tag will be created. If the requested information is returned but the returned GuestTools information is different from the current GuestTools tag value of the VM instance, then the tag will be updated.
- Format of the GuestTools option:
API Response
Sample
Response
{
"version": "1.0.0",
"status": "Running"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| version | String | The version of the GuestTools. | 3.7.0 |
| status | String | The status of the GuestTools. | 3.7.0 |
| features | Map | The features that GuestTools supports and the status of the features. | 4.2.0 |
| success | boolean | Whether the operation succeeds. | 3.7.0 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.7.0 |
#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. | 3.7.0 |
| description | String | The brief description of the error. | 3.7.0 |
| details | String | The details about the error. | 3.7.0 |
| elaboration | String | The reserved field. Default value: null. | 3.7.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.7.0 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 3.7.0 |
SDK Sample
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()