Managed Object - GuestProcessManager(vim.vm.guest.ProcessManager)

Property of
GuestOperationsManager
See also
GuestAuthentication, GuestProcessInfo, GuestProgramSpec, VirtualMachine
Since
vSphere API 5.0


Managed Object Description

ProcessManager is the managed object that provides APIs to manipulate the guest operating system processes.

Properties

Name Type Description
None

Methods

Methods defined in this Managed Object
ListProcessesInGuest, ReadEnvironmentVariableInGuest, StartProgramInGuest, TerminateProcessInGuest

ListProcessesInGuest(listProcesses)

List the processes running in the guest operating system, plus those started by StartProgramInGuest that have recently completed.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the GuestProcessManager used to make the method call.
vm PManagedObjectReference
to a VirtualMachine

Virtual machine to perform the operation on.

Since vSphere API 5.0
auth PGuestAuthentication

The guest authentication data. See GuestAuthentication.

Since vSphere API 5.0
pids* Pxsd:long[]

If set, only return information about the specified processes. Otherwise, information about all processes are returned. If a specified processes does not exist, nothing will be returned for that process.

Since vSphere API 5.0
*Need not be set PRequired privilege - see tooltip for details

Return Value

Type Description
GuestProcessInfo[]The list running processes is returned in an array of GuestProcessInfo structures.

Faults

Type Description
GuestComponentsOutOfDateThrown if the guest agent is too old to support the operation.
GuestOperationsFaultThrown if there is an error processing a guest operation.
GuestOperationsUnavailableThrown if the VM agent for guest operations is not running.
GuestPermissionDeniedThrown if there are insufficient permissions in the guest OS.
InvalidGuestLoginThrown if the the guest authentication information was not accepted.
InvalidPowerStateThrown if the VM is not powered on.
InvalidStateThrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuestThrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuestThrown if the operation is not supported by the guest OS.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition



ReadEnvironmentVariableInGuest(readEnvironmentVariable)

Reads an environment variable from the guest OS

If the authentication uses interactiveSession, then the environment being read will be that of the user logged into the desktop. Otherwise it's the environment of the user specified by the auth.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the GuestProcessManager used to make the method call.
vm PManagedObjectReference
to a VirtualMachine

Virtual machine to perform the operation on.

Since vSphere API 5.0
auth PGuestAuthentication

The guest authentication data. See GuestAuthentication.

Since vSphere API 5.0
names* Pxsd:string[]

The names of the variables to be read. If not set, then all the environment variables are returned.

Since vSphere API 5.0
*Need not be set PRequired privilege - see tooltip for details

Return Value

Type Description
xsd:string[]A string array containing the value of the variables, or all environment variables if nothing is specified. The format of each string is "name=value". If any specified environment variable isn't set, then nothing is returned for that variable.

Faults

Type Description
GuestComponentsOutOfDateThrown if the guest agent is too old to support the operation.
GuestOperationsFaultThrown if there is an error processing a guest operation.
GuestOperationsUnavailableThrown if the VM agent for guest operations is not running.
GuestPermissionDeniedThrown if there are insufficient permissions in the guest OS.
InvalidGuestLoginThrown if the the guest authentication information was not accepted.
InvalidPowerStateThrown if the VM is not powered on.
InvalidStateThrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuestThrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuestThrown if the operation is not supported by the guest OS.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual machine is busy. accepted by the guest OS.

Events

Type
None

Show WSDL type definition



StartProgramInGuest(startProgram)

Starts a program in the guest operating system.

A process started this way can have its status queried with ListProcessesInGuest. When the process completes, its exit code and end time will be available for 5 minutes after completion.

If VMware Tools is restarted, the exit code and end time will not be available.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the GuestProcessManager used to make the method call.
vm PManagedObjectReference
to a VirtualMachine

Virtual machine to perform the operation on.

Since vSphere API 5.0
auth PGuestAuthentication

The guest authentication data. See GuestAuthentication.

Since vSphere API 5.0
spec PGuestProgramSpec

The arguments describing the program to be started.

Since vSphere API 5.0
PRequired privilege - see tooltip for details

Return Value

Type Description
xsd:longThe pid of the program started.

Faults

Type Description
CannotAccessFileThrown if the program path cannot be accessed.
FileFaultThrown if there is a file error in the guest operating system.
FileNotFoundThrown if the program path does not exist.
GuestComponentsOutOfDateThrown if the guest agent is too old to support the operation.
GuestOperationsFaultThrown if there is an error processing a guest operation.
GuestOperationsUnavailableThrown if the VM agent for guest operations is not running.
GuestPermissionDeniedThrown if the program path cannot be run because the guest authentication will not allow the operation.
InvalidGuestLoginThrown if the the guest authentication information was not accepted.
InvalidPowerStateThrown if the VM is not powered on.
InvalidStateThrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuestThrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuestThrown if the operation is not supported by the guest OS.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition



TerminateProcessInGuest(terminateProcess)

Terminates a process in the guest OS.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the GuestProcessManager used to make the method call.
vm PManagedObjectReference
to a VirtualMachine

Virtual machine to perform the operation on.

Since vSphere API 5.0
auth PGuestAuthentication

The guest authentication data. See GuestAuthentication.

Since vSphere API 5.0
pid Pxsd:long

Process ID of the process to be terminated

Since vSphere API 5.0
PRequired privilege - see tooltip for details

Return Value

Type Description
None

Faults

Type Description
GuestComponentsOutOfDateThrown if the guest agent is too old to support the operation.
GuestOperationsFaultThrown if there is an error processing a guest operation.
GuestOperationsUnavailableThrown if the VM agent for guest operations is not running.
GuestPermissionDeniedThrown if the process cannot be terminated because the guest authentication will not allow the operation.
GuestProcessNotFoundThrown if the pid does not refer to a valid process.
InvalidGuestLoginThrown if the the guest authentication information was not accepted.
InvalidPowerStateThrown if the VM is not powered on.
InvalidStateThrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuestThrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuestThrown if the operation is not supported by the guest OS.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition