VMware Host - Connect

Declaration

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

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.

Connection Parameters

Property

Type

Required

Default

Markup

Description

Host type

Text (options)

Yes

VMware VI Server 

  1. HOSTTYPE="Server"

  2. HOSTTYPE="Workstation"

  3. HOSTTYPE="VIServer"

  4. HOSTTYPE="Player"

Specifies 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 name

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 VIServer 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.

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

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

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