VMware Guest - Run Program
Declaration
<AMVMWAREGUEST ACTIVITY="run_program" HOSTTYPE="text (options)" SERVER="text" USERNAME="text" PASSWORD="text (encrypted)" VMPATH="text" GUESTUSERNAME="text" CONSOLE="YES" LAUNCHGUI="YES/NO" TIMEOUT="number" GUESTPASSWORD="text (encrypted)" OPENVMTIMEOUT="number" POWERONTIMEOUT="number" TOOLSTIMEOUT="number" LOGINTIMEOUT="number" CONNECTIONTIMEOUT="number" PROGRAMNAME="text" ARGUMENTS="text" RESULTDATASET="text" RETURNIMMEDIATELY="YES/NO" ACTIVATEWINDOW="YES/NO" />
Description: Runs a program in the guest operating system.
Practical Usage
Used to start a program or application on the guest OS.
Connection Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Connection |
|
|
|
|
Indicates where connection details, guest credentials and other preferences should originate from. This is a visual mode parameter used only during task construction and configuration, thus, comprises no markup. The available options are:The available options are:
|
Session |
Text |
Yes if Connection set to Session |
GuestOSOpsSession1 |
SESSION="MySession" |
The name of an existing session to associate this activity with. This parameter is available only if the Connection parameter is set to Session. |
Host type |
Text (options) |
Yes if Connection set to Host |
VMWare VI Server |
|
Indicates the VMware software type running on the host where the virtual machine is located. If you are using VMware Server to connect to a remote host, it does not matter which VMware product (if any) is running on the local host. This parameter is available only if the Connection parameter is set to Host. The available options are:
|
Host name |
Text |
Yes |
(Empty) |
|
The host name or IP address of the computer where the virtual machine is located. This parameter is active only if the Host type parameter is set to VMWare Server (1.0x) or VMWare VI Server (ESX/ESXi, vCenter, VMWare Server 2.0). |
[Host] Username |
Text |
Yes |
(Empty) |
USERNAME="theUser" |
The username identifying a valid user account on the virtual machine. This parameter is active only if the Host type parameter is set to VMWare Server (1.0x) or VMWare VI Server (ESX/ESXi, vCenter, VMWare Server 2.0). |
[Host] Password |
Text |
Yes |
(Empty) |
PASSWORD="encrypted" |
The password identifying a valid user account on the virtual machine. This parameter is active only if the Host type parameter is set to VMWare Server (1.0x) or VMWare VI Server (ESX/ESXi, vCenter, VMWare Server 2.0). |
Virtual machine path |
Text |
Yes |
(Empty) |
VMPATH= "c:\My Virtual Machines\vm_name.vmx" |
The path to the virtual machine. (Example: c:\My Virtual Machines\virtual_machine_name.vmx). |
[Guest] Username |
Text |
Yes |
(Empty) |
GUESTUSERNAME="user" |
The username to authenticate the guest user. |
[Guest] Password |
Text |
Yes |
(Empty) |
GUESTPASSWORD="encrypted" |
The password to authenticate the guest user. |
Log onto console session |
Yes/No |
No |
No |
CONSOLE="yes" |
If set to YES, the user will be logged onto the console session. This parameter is set to NO by default. |
Launch GUI |
Yes/No |
No |
No |
LAUNCHGUI="yes" |
If set to YES, a GUI (Graphic User Interface) will appear on the desktop upon connection. If set to NO (default), no GUI will be launched and operations will execute in the background. |
Open VM timeout |
Number |
No |
60 |
OPENVMTIMEOUT="2" |
The maximum time period in seconds during which this activity must be completed or the step times out. The default value is 60 seconds. |
Power on timeout |
Number |
No |
60 |
POWERONTIMEOUT="3" |
The maximum time period in seconds during which the VM must power on or the step times out. The default value is 60 seconds. |
VMware tools timeout |
Number |
No |
300 |
TOOLSTIMEOUT="4" |
The maximum time period in seconds during which VMWare Tools must start on the guest operating system or the step times out. The default value is 300 seconds. |
Log on timeout |
Number |
No |
60 |
LOGINTIMEOUT="5" |
The maximum time period in seconds during which the log on process must be completed or the step times out. The default value is 60 seconds. |
Connection timeout |
Number |
No |
60 |
CONNECTIONTIMEOUT="6" |
The maximum time period in seconds during which a connection must be established or the step times out. The default value is 60 seconds. |
Guest OS Operations
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Program Name |
Text |
Yes |
(Empty) |
PROGRAMNAME="C:\temp\program.exe" |
The path to the executable file on the guest operating system in which to run. |
Command Arguments |
Text |
Yes |
(Empty) |
ARGUMENTS="cmd_arguments" |
A string to be passed as command line arguments to the executable to run. |
Return Immediately |
Yes/No |
No |
No |
RETURNIMMEDIATELY="yes" |
If set to YES, this function reports completion to the job handle as soon as the program starts in the guest. If set to NO, this function will report completion to the job handle when the program exits in the guest operating system. Set to NO by default. |
Activate Window |
Yes/No |
No |
No |
ACTIVATEWINDOW="yes" |
If set to YES, when running a program with a graphical user interface in Windows guest operating systems, the application's window will be visible and not minimized on the guest's screen. Set to NO by default. |
Timeout (seconds) |
Number |
No |
300 |
TIMEOUT="20" |
The maximum value in seconds that this activity should be allowed to execute or the step times out. |
Create and populate dataset with process information |
Text |
No |
(Empty) |
RESULTDATASET="theData" |
The dataset to create and populate with process information about the program that ran. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: Run program "C:\program files\myprogram.exe" into guest operating system. Argument is "cmd_arg". Return immediately. Activate program window. Timeout is 800 seconds. Use "theSession" GuestOS session.
<AMVMWAREGUEST ACTIVITY="run_program" PROGRAMNAME="C:\program files\myprogram.exe" ARGUMENTS="cmd_arg" RETURNIMMEDIATELY="yes" ACTIVATEWINDOW="yes" RESULTDATASET="theDataset" TIMEOUT="800" SESSION="theSession" />