GuestInfo

GuestInfo
GuestInfo

Information about the guest operating system.

Most of this information is collected by VMware Tools. In general, be sure you have VMware Tools installed and that the virtual machine is running when you access this information.

AllOf
This class requires all of the following:
JSON Example
{
    "_typeName": "string",
    "toolsStatus": "string",
    "toolsVersionStatus": "string",
    "toolsVersionStatus2": "string",
    "toolsRunningStatus": "string",
    "toolsVersion": "string",
    "toolsInstallType": "string",
    "guestId": "string",
    "guestFamily": "string",
    "guestFullName": "string",
    "guestDetailedData": "string",
    "hostName": "string",
    "ipAddress": "string",
    "net": [
        {
            "_typeName": "string",
            "network": "string",
            "ipAddress": [
                "string"
            ],
            "macAddress": "string",
            "connected": false,
            "deviceConfigId": 0,
            "dnsConfig": {
                "_typeName": "string",
                "dhcp": false,
                "hostName": "string",
                "domainName": "string",
                "ipAddress": [
                    "string"
                ],
                "searchDomain": [
                    "string"
                ]
            },
            "ipConfig": {
                "_typeName": "string",
                "ipAddress": [
                    {
                        "_typeName": "string",
                        "ipAddress": "string",
                        "prefixLength": 0,
                        "origin": "string",
                        "state": "string",
                        "lifetime": "string"
                    }
                ],
                "dhcp": {
                    "_typeName": "string",
                    "ipv6": {
                        "_typeName": "string",
                        "enable": false,
                        "config": [
                            {
                                "_typeName": "string",
                                "key": "string",
                                "value": "string"
                            }
                        ]
                    },
                    "ipv4": {
                        "_typeName": "string",
                        "enable": false,
                        "config": [
                            {
                                "_typeName": "string",
                                "key": "string",
                                "value": "string"
                            }
                        ]
                    }
                },
                "autoConfigurationEnabled": false
            },
            "netBIOSConfig": {
                "_typeName": "string",
                "mode": "string"
            }
        }
    ],
    "ipStack": [
        {
            "_typeName": "string",
            "dnsConfig": {
                "_typeName": "string",
                "dhcp": false,
                "hostName": "string",
                "domainName": "string",
                "ipAddress": [
                    "string"
                ],
                "searchDomain": [
                    "string"
                ]
            },
            "ipRouteConfig": {
                "_typeName": "string",
                "ipRoute": [
                    {
                        "_typeName": "string",
                        "network": "string",
                        "prefixLength": 0,
                        "gateway": {
                            "_typeName": "string",
                            "ipAddress": "string",
                            "device": "string"
                        }
                    }
                ]
            },
            "ipStackConfig": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": "string"
                }
            ],
            "dhcpConfig": {
                "_typeName": "string",
                "ipv6": {
                    "_typeName": "string",
                    "enable": false,
                    "config": [
                        {
                            "_typeName": "string",
                            "key": "string",
                            "value": "string"
                        }
                    ]
                },
                "ipv4": {
                    "_typeName": "string",
                    "enable": false,
                    "config": [
                        {
                            "_typeName": "string",
                            "key": "string",
                            "value": "string"
                        }
                    ]
                }
            }
        }
    ],
    "disk": [
        {
            "_typeName": "string",
            "diskPath": "string",
            "capacity": 0,
            "freeSpace": 0,
            "filesystemType": "string",
            "mappings": [
                {
                    "_typeName": "string",
                    "key": 0
                }
            ]
        }
    ],
    "screen": {
        "_typeName": "string",
        "width": 0,
        "height": 0
    },
    "guestState": "string",
    "appHeartbeatStatus": "string",
    "guestKernelCrashed": false,
    "appState": "string",
    "guestOperationsReady": false,
    "interactiveGuestOperationsReady": false,
    "guestStateChangeSupported": false,
    "generationInfo": [
        {
            "_typeName": "string",
            "key": "string",
            "generationNo": 0
        }
    ],
    "hwVersion": "string",
    "customizationInfo": {
        "_typeName": "string",
        "customizationStatus": "string",
        "startTime": "string",
        "endTime": "string",
        "errorMsg": "string"
    }
}
toolsStatus
Optional

Deprecated as of vSphere API 4.0 use VirtualMachineToolsVersionStatusEnum and VirtualMachineToolsRunningStatusEnum.

Current status of VMware Tools running in the guest operating system.

Possible values:

  • toolsNotInstalled: VMware Tools has never been installed or has not run in the virtual machine.
  • toolsNotRunning: VMware Tools is not running.
  • toolsOld: VMware Tools is running, but the version is not current.
  • toolsOk: VMware Tools is running and the version is current.
Possible values are : toolsNotInstalled, toolsNotRunning, toolsOld, toolsOk,
string
toolsVersionStatus
Optional

Deprecated as of vSphere API 5.1 use GuestInfo.toolsVersionStatus2.

Current version status of VMware Tools in the guest operating system, if known.

The set of possible values is described in VirtualMachineToolsVersionStatusEnum for vSphere API 5.0.

string
toolsVersionStatus2
Optional

Current version status of VMware Tools in the guest operating system, if known.

The set of possible values is described in VirtualMachineToolsVersionStatusEnum

string
toolsRunningStatus
Optional

Current running status of VMware Tools in the guest operating system, if known.

The set of possible values is described in VirtualMachineToolsRunningStatusEnum

string
toolsVersion
Optional

Current version of VMware Tools, if known.

string
toolsInstallType
Optional

Current installation type of VMware Tools in the guest operating system.

The set of possible values is described in VirtualMachineToolsInstallTypeEnum

string
guestId
Optional

Guest operating system identifier (short name), if known.

string
guestFamily
Optional

Guest operating system family, if known.

string
guestFullName
Optional

Guest operating system full name, if known.

string
guestDetailedData
Optional

Guest OS Detailed data.

The guest detailed data string is a property list (space separated, name='value' pairs where the value is embedded in single quotes) of metadata provided by the guest OS when sufficiently recent tools are installed. The fields supplied will vary between distributions and distribution versions. The order of these fields is not guaranteed.

The guest detailed data string is not available before a virtual machine is first powered on. The guest must first be booted and a supported version of tools must be run to record the data (approximately 30-60 seconds after booting). Once the guest detailed data string has been recorded, it will be available whether the virtual machine is powered off or on.

Available fields:

Name Description Tools version first available
architecture 'Arm' or 'X86' 11.2.0
bitness '32' or '64' 11.2.0
buildNumber OS build number 11.2.0
cpeString NIST Common Platform Enumeration Specification string, a standardized identifier for the OS 12.2.0
distroAddlVersion Longer OS version string that may contain additional info (e.g. version name) 12.2.0
distroName OS distribution name 11.2.0
distroVersion OS version string 11.2.0
familyName OS family name (Windows, Linux, etc.) 11.2.0
kernelVersion Linux kernel version, Windows 10+ patch number, or Windows build number 11.2.0
prettyName Officially specified distro "pretty name" 11.2.0

Since: vSphere API Release 8.0.2.0

string
hostName
Optional

Hostname of the guest operating system, if known.

string
ipAddress
Optional

Primary IP address assigned to the guest operating system, if known.

net
Optional

Guest information about network adapters, if known.

ipStack
Optional

Guest information about IP networking stack, if known.

disk
Optional

Guest information about disks.

You can obtain Linux guest disk information for the following file system types: Ext2, Ext3, Ext4, ReiserFS, XFS, Btrfs, NTFS, VFAT, UFS, PCFS, HFS, and MS-DOS.

NOTE: Installing a more recent version of VMware Tools in the guest may help obtain disk information for more file system types. Please refer the VMware Tools User Guide for up-to-date supported file system types.

screen
Optional

Screen settings

string
guestState
Required

Operation mode of guest operating system.

One of:

  • "running" - Guest is running normally.
  • "shuttingdown" - Guest has a pending shutdown command.
  • "resetting" - Guest has a pending reset command.
  • "standby" - Guest has a pending standby command.
  • "notrunning" - Guest is not running.
  • "unknown" - Guest information is not available.
string
appHeartbeatStatus
Optional

Application heartbeat status.

Please see VirtualMachineAppHeartbeatStatusTypeEnum

boolean
guestKernelCrashed
Optional

Guest operating system's kernel crash state.

If true, the guest operating system's kernel has crashed.

string
appState
Optional

Application state.

If vSphere HA is enabled and the vm is configured for Application Monitoring and this field's value is "appStateNeedReset" then HA will attempt immediately reset the vm. There are some system conditions which may delay the immediate reset. The immediate reset will be performed as soon as allowed by vSphere HA and ESX. If during these conditions the value is changed to appStateOk the reset will be cancelled.

See also GuestInfoAppStateTypeEnum.

boolean
guestOperationsReady
Optional

Guest Operations availability.

If true, the virtual machine is ready to process guest operations.

boolean
interactiveGuestOperationsReady
Optional

Interactive Guest Operations availability.

If true, the virtual machine is ready to process guest operations as the user interacting with the guest desktop.

boolean
guestStateChangeSupported
Optional

State change support.

If true, the virtual machine is ready to process soft power operations.

generationInfo
Optional

A list of namespaces and their corresponding generation numbers.

Only namespaces with non-zero VirtualMachineNamespaceManagerCreateSpec.maxSizeEventsFromGuest are guaranteed to be present here. Use VirtualMachineNamespaceManager.ListNamespaces to retrieve list of namespaces.

string
hwVersion
Optional

The hardware version string for this virtual machine.

customizationInfo
Optional

Since: vSphere API Release 7.0.2.0