REST API - get

vcenter vm tools: get

Get the properties of VMware Tools. This operation was added in vSphere API 7.0.0.0.

Request:

HTTP request

GET https://{server}/rest/vcenter/vm/{vm}/tools

Path Parameters

Name Type Description
Required
vm string Identifier of the virtual machine.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "auto_update_supported"true,
        "upgrade_policy""MANUAL",
        "install_attempt_count"1,
        "version_status""NOT_INSTALLED",
        "version_number"1,
        "run_state""NOT_RUNNING",
        "error"{},
        "version""string",
        "install_type""UNKNOWN"
    }
}

Response Type:

Name Type Description
bold = required
value info VMware Tools properties.
value.auto_update_supported boolean Set if the virtual machine supports auto-upgrading Tools via vcenter.vm.tools.upgrade_policy. This attribute was added in vSphere API 7.0.0.0.

value.install_attempt_count long Number of attempts that have been made to install or upgrade the version of Tools installed on this virtual machine. This attribute was added in vSphere API 7.0.0.0.

Optional. Only set if there was a recent Tools install or upgrade attempt.

value.error exception Error that happened, if any, during last attempt to upgrade or install Tools. This attribute was added in vSphere API 7.0.0.0.

Optional. Only set if a the last Tools install or upgrade attempt failed.

value.version_number long Version of VMware Tools installed on the guest operating system. This attribute was added in vSphere API 7.0.0.0.

Optional. Only set if Tools is installed. This is an integer constructed as follows: (((MJR) << 10) + ((MNR) << 5) + (REV)) Where MJR is tha major verson, MNR is the minor version and REV is the revision. Tools version = T Tools Version Major = MJR = (T / 1024) Tools Version Minor = MNR = ((T % 1024) / 32) Tools Version Revision = BASE = ((T % 1024) % 32) Tools actual version = MJR.MNR.REV.

value.version string Version of VMware Tools installed on the guest operating system. This is a human-readable value that should not be parsed. This attribute was added in vSphere API 7.0.0.0.

Optional. Only set if Tools is installed.

value.upgrade_policy string Tools upgrade policy setting for the virtual machine. vcenter.vm.tools.upgrade_policy. This attribute was added in vSphere API 7.0.0.0.

Defines when Tools are auto-upgraded for a virtual machine. This enumeration was added in vSphere API 7.0.0.0. Value is one of:
MANUAL: No auto-upgrades for Tools will be performed for this virtual machine. Users must manually invoke the upgrade operation to update Tools. This constant was added in vSphere API 7.0.0.0.
UPGRADE_AT_POWER_CYCLE: When the virtual machine is power-cycled, the system checks for a newer version of Tools when the virtual machine is powered on. If it is available, a Tools upgrade is automatically performed on the virtual machine and it is rebooted if necessary. This constant was added in vSphere API 7.0.0.0.

value.version_status string Current version status of VMware Tools in the guest operating system, if known. This attribute was added in vSphere API 7.0.0.0.

Optional. Only set if Tools version status is known.

value.install_type string Current installation type of VMware Tools in the guest operating system. This attribute was added in vSphere API 7.0.0.0.

Optional. Only set if Tools install type is known.

value.run_state string Current run state of VMware Tools in the guest operating system. This attribute was added in vSphere API 7.0.0.0.

Current run state of VMware Tools in the guest operating system. This enumeration was added in vSphere API 7.0.0.0. Value is one of:
NOT_RUNNING: VMware Tools is not running. This constant was added in vSphere API 7.0.0.0.
RUNNING: VMware Tools is running. This constant was added in vSphere API 7.0.0.0.
EXECUTING_SCRIPTS: VMware Tools is running scripts as part of a state transition. This constant was added in vSphere API 7.0.0.0.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
404 not_found if the virtual machine is not found.