VM Operations - Connect

Declaration

<AMVMWAREVM ACTIVITY="connect" SESSION="text" HOSTTYPE="text (options)" SERVER="text" USERNAME="text" PASSWORD="text" CONNECTIONTIMEOUT="number" />

See Also

VM Operations - Clone | VM Operations - Connect | VM Operations - Create Snapshot | VM Operations - Delete | VM Operations - Delete Snapshot | VM Operations - Disconnect | VM Operations - Install Tools | VM Operations - List Registered VMs | VM Operations - List Running VMs | VM Operations - List Snapshots | VM Operations - Pause | VM Operations - Power Off | VM Operations - Power On | VM Operations - Register VMs | VM Operations - Reset | VM Operations - Revert to Snapshots | VM Operations - Suspend | VM Operations - Unregister VM

Description

Connects to the specified host and creates a session in which to associate subsequent VM steps. This activity allows simultaneous connections within a single task using the same username/password. If the virtual machine is on a host running VMware Server | you can connect to that host whether it is a local or remote host. VMware Workstation currently allows you to manipulate virtual machines only from the local host.

Practical Usage

Essentially used to connect to an arbitrary host using the name of the host machine, along with a user name and password identifying a valid user account on the machine. This allows you to access any networked host machine that is running VMware Server from a single client machine.

Parameters

Connection Properties

Property

Type

Required

Default

Markup

Description

Host Type

Text (options)

Yes

(Empty)

HOSTTYPE="VIServer"

Describes the VMware software running on the host where the virtual machine is located. The available options are:

  • VMware Server (1.0x)  

  • VMworkstation

  • VMware VI Server (ESX/ESXi, vCenter, VMware server 2.0)(Default)

  • VMware Player

Host

Text

Yes

(Empty)

SERVER="host.server.com"

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 or VMware VI Server.

Username

Text

Yes

(Empty)

USERNAME="sasa"

The username identifying a valid user account on the machine. This parameter is active only if the Host Type parameter is set to VMware Server or VMware VI Server.

Password

Text

Yes

(Empty)

PASSWORD="password"

The password identifying a valid user account on the machine. This parameter is active only if the Host Type parameter is set to VMware Server or VMware VI Server.

Connection Timeout

Number

No

60

CONNECTIONTIMEOUT="sas"

The maximum time out value in seconds that this activity should wait for a response from the host.

Session

Text

Yes

VMSession

SESSION="VMSession3"

The name of the session in which to identify this connection with. This allows several VMware activities to be linked to a specific session. Numerous sessions can be used within a single task.

Connection Properties

These properties allow you to create a custom connection for this activity or link it to a session previously established (using the Connect activity) that contains pre-defined connection parameters.

Property

Type

Required

Default

Markup

Description

Provide Connection

 

 

 

 

Indicates where this activity's connection should originate from. Different parameters become active depending on the option selected. The available options are:

  • Custom (Default) - A custom set of credentials will be entered for this activity. Select this option if performing a single a single operation.

  • Session Based - Credentials should derive from a session created in a previous step with the use of the Connect activity. This allows several operations to be linked to a single session, eliminating redundancy. Multiple sessions can exist in a single task.

Host Type

Text (options)

Yes

VIServer

HOSTTYPE="Workstation"

The type of VM host to establish a connection with. The available options are:

  • VMware Server (1.0x)

  • VMware Workstation

  • VMware VI Server (ESX/ESXi, vCenter, VMware Server 2.0)(Default)

  • VMware Player

This property is active only if Custom is selected under the Provide Connection property.

Host

Text

Yes

(Empty)

SECRETKEY=

"kWcrlUX5JEDGM/LtmEENI/

aVmYvHNif5zB+d9+ct"

The VM host to connect to. This parameter varies depending on which option is selected in the Host Type parameter. If VMware VI Server is selected, use URL format (Example:  "https://<hostName>:<port>/sdk" where <hostName> is either the DNS name or IP address, and <port> might be optional; credentials are required even for connections made locally. With VMware Workstation, use NULL to connect to the local host. With VMware Server 1.0.x, use a DNS name or IP address for remote connections, or the same as Workstation for local connections.

Username

Text

No

AutoMate

USERAGENT="AutoMate"

The User-Agent header name. The User-Agent request-header field contains information about the user agent originating the request such as timeouts, proxies, name, etc. The default User Agent name is AutoMate.

This property is active only if Custom is selected under the Provide Credentials property.

Password

Text

No

(Empty)

SERVICEURL=

"https://sdb.eu-west-1.amazonaws.com"

The Service URL used to make requests to the EC2 service. The Service URL provides the service endpoint. For example, To make the service call to a different region, you can pass the region-specific endpoint, such as 'https://sdb.eu-west-1.amazonaws.com'.

This property is active only if Custom is selected under the Provide Credentials property.

Connection Timeout (seconds)

Number

No

60

MAXERRORRETRY="4"

Signifies how many times the Amazon EC2 engine should retry the request before returning an error.

This property is active only if Custom is selected under the Provide Credentials property.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Connect VM session "VMSession2". VMware host type is "Workstation".

 

<AMVMWAREVM ACTIVITY="connect" SESSION="VMSession2" HOSTTYPE="Workstation" />

 

↑ Top