Virtual Machine Get Guest

Virtual Machine Get Guest

Information about VMware Tools and about the virtual machine from the perspective of VMware Tools.

Information about the guest operating system is available in VirtualCenter. Guest operating system information reflects the last known state of the virtual machine. For powered on machines, this is current information. For powered off machines, this is the last recorded state before the virtual machine was powered off.

Request
URI
GET
https://{vcenter-host}/sdk/vim25/{release}/VirtualMachine/{moId}/guest
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the property attaches; the serialized managed object reference for a request has the form moType/moId, in this case VirtualMachine/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns GuestInfo of type(s) application/json
This response body class contains all of the following: DataObject
{
    "_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


Virtual Machine Operations
POST
Virtual Machine Acquire Mks Ticket
POST
Virtual Machine Acquire Ticket
POST
Virtual Machine Answer VM
POST
Virtual Machine Apply Evc Mode VM Task
POST
Virtual Machine Attach Disk Task
POST
Virtual Machine Check Customization Spec
POST
Virtual Machine Clone VM Task
POST
Virtual Machine Consolidate VM Disks Task
POST
Virtual Machine Create Screenshot Task
POST
Virtual Machine Create Secondary VM Task
POST
Virtual Machine Create Secondary VM Ex Task
POST
Virtual Machine Create Snapshot Task
POST
Virtual Machine Create Snapshot Ex Task
POST
Virtual Machine Crypto Unlock Task
POST
Virtual Machine Customize VM Task
POST
Virtual Machine Defragment All Disks
POST
Virtual Machine Destroy Task
POST
Virtual Machine Detach Disk Task
POST
Virtual Machine Disable Secondary VM Task
POST
Virtual Machine Drop Connections
POST
Virtual Machine Enable Secondary VM Task
POST
Virtual Machine Estimate Storage For Consolidate Snapshots Task
POST
Virtual Machine Export Vm
POST
Virtual Machine Extract Ovf Environment
GET
Virtual Machine Get Alarm Actions Enabled
GET
Virtual Machine Get Available Field
GET
Virtual Machine Get Capability
GET
Virtual Machine Get Config
GET
Virtual Machine Get Config Issue
GET
Virtual Machine Get Config Status
GET
Virtual Machine Get Custom Value
GET
Virtual Machine Get Datastore
GET
Virtual Machine Get Declared Alarm State
GET
Virtual Machine Get Disabled Method
GET
Virtual Machine Get Effective Role
GET
Virtual Machine Get Environment Browser
GET
Virtual Machine Get Guest
GET
Virtual Machine Get Guest Heartbeat Status
GET
Virtual Machine Get Layout
GET
Virtual Machine Get Layout Ex
GET
Virtual Machine Get Name
GET
Virtual Machine Get Network
GET
Virtual Machine Get Overall Status
GET
Virtual Machine Get Parent
GET
Virtual Machine Get Parent V App
GET
Virtual Machine Get Permission
GET
Virtual Machine Get Recent Task
GET
Virtual Machine Get Resource Config
GET
Virtual Machine Get Resource Pool
GET
Virtual Machine Get Root Snapshot
GET
Virtual Machine Get Runtime
GET
Virtual Machine Get Snapshot
GET
Virtual Machine Get Storage
GET
Virtual Machine Get Summary
GET
Virtual Machine Get Tag
GET
Virtual Machine Get Triggered Alarm State
GET
Virtual Machine Get Value
POST
Virtual Machine Instant Clone Task
POST
Virtual Machine Make Primary VM Task
POST
Virtual Machine Mark As Template
POST
Virtual Machine Mark As Virtual Machine
POST
Virtual Machine Migrate VM Task
POST
Virtual Machine Mount Tools Installer
POST
Virtual Machine Power Off VM Task
POST
Virtual Machine Power On VM Task
POST
Virtual Machine Promote Disks Task
POST
Virtual Machine Put Usb Scan Codes
POST
Virtual Machine Query Changed Disk Areas
POST
Virtual Machine Query Connections
POST
Virtual Machine Query Fault Tolerance Compatibility
POST
Virtual Machine Query Fault Tolerance Compatibility Ex
POST
Virtual Machine Query Unowned Files
POST
Virtual Machine Reboot Guest
POST
Virtual Machine Reconfig VM Task
POST
Virtual Machine Refresh Storage Info
POST
Virtual Machine Reload
POST
Virtual Machine Reload Virtual Machine From Path Task
POST
Virtual Machine Relocate VM Task
POST
Virtual Machine Remove All Snapshots Task
POST
Virtual Machine Rename Task
POST
Virtual Machine Reset Guest Information
POST
Virtual Machine Reset VM Task
POST
Virtual Machine Revert To Current Snapshot Task
POST
Virtual Machine Send NMI
POST
Virtual Machine Set Custom Value
POST
Virtual Machine Set Display Topology
POST
Virtual Machine Set Screen Resolution
POST
Virtual Machine Shutdown Guest
POST
Virtual Machine Standby Guest
POST
Virtual Machine Start Recording Task
POST
Virtual Machine Start Replaying Task
POST
Virtual Machine Stop Recording Task
POST
Virtual Machine Stop Replaying Task
POST
Virtual Machine Suspend VM Task
POST
Virtual Machine Terminate Fault Tolerant VM Task
POST
Virtual Machine Terminate VM
POST
Virtual Machine Turn Off Fault Tolerance For VM Task
POST
Virtual Machine Unmount Tools Installer
POST
Virtual Machine Unregister VM
POST
Virtual Machine Upgrade Tools Task
POST
Virtual Machine Upgrade VM Task