VM Operations - Reset

 

 

 

Declaration

<AMVMWAREVM ACTIVITY="reset_vm" VMPATH="text" TOOLSTIMEOUT="number" TIMEOUT="number" OPENVMTIMEOUT="number" SOFT="yes/no" HOSTTYPE="text (options)" SERVER="text" USERNAME="text" PASSWORD="text (encrypted)" />

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

Reboots the specified virtual machine. The reboot process can be specified as hard or soft.

Practical Usage

Can be used to reboot a machine after program installation or MS critical update.

Parameters

Virtual Machine Properties

Property

Type

Required

Default

Markup

Description

Virtual machine path

Text

Yes

(Empty)

VMPATH="C:\VMFolder\VMfile.vmx"

The absolute path of the virtual machine configuration (.vmx) file in which to reset. This parameter varies by product platform. With ESX/ESXi hosts and VMware Server 2.0, use a URL of the form "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 undef 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.

Soft

Yes/No

No

No

SOFT="yes"

If set to YES, the virtual machine executes shut down procedures before resetting. If set to NO (default) the virtual machine state changes without giving the guest operating system the opportunity to execute shutdown procedures (analogous to disconnecting the power to a physical computer system). To ensure an ordered power off, be sure to specify the soft option.

VMware tools timeout (seconds)

Number

No

300

TOOLSTIMEOUT="320"

The maximum time period in seconds during which VMware Tools is successfully applied or the step times out.

Timeout (seconds)

Number

No

300

TIMEOUT="50"

The maximum time period in seconds during which this activity must be completed or the step times out.

Open VM Timeout (seconds)

Number

No

60

OPENVMTIMEOUT="40"

The maximum time period in seconds during which this activity must successfully connect to the specified VMware product or the step times out.

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 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 parameter is active only if the Provide Connection parameter is set to Custom.

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

No

(Empty)

USERNAME="theUser"

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

No

(Empty)

PASSWORD="AM1DWVc+PAIZ6"

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 (seconds)

Number

No

60

CONNECTIONTIMEOUT="20"

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

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: Reset virtual machine "C:\Virtual Machines\Windows 7 x64 (FULL)\Windows 7 x64.vmx". Reset the guest opertaing system. VMware tools timeout is 330 seconds. Timeout is 65 seconds. Open vm timeout is 65 seconds. VMware host type is "VIServer". VMware host name is "209.123.456.789". Host username is "root".

 

<AMVMWAREVM ACTIVITY="reset_vm" VMPATH="C:\Virtual Machines\Windows 7 x64 (FULL)\Windows 7 x64.vmx" TOOLSTIMEOUT="330" TIMEOUT="65" OPENVMTIMEOUT="65" SOFT="yes" HOSTTYPE="VIServer" SERVER="209.123.456.789" USERNAME="root" PASSWORD="AM1hd66umsQRtNbulaHHhbEOBF423belTvAaME" />

↑ Top of Page