VM Operations - Delete Snapshot

Declaration

<AMVMWAREVM ACTIVITY="text" SNAPNAME="text" TIMEOUT="number" OPENVMTIMEOUT="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

Deletes an existing virtual machine snapshot.

Practical Usage

Used to delete a snapshot, usually after saving a backup.

Parameters

Virtual Machine Properties

Property

Type

Required

Default

Markup

Description

Virtual Machine Path

Text

Yes

(Empty)

VMPATH="C:\Temp\Snapshot.vmx"

The path to the VM snapshot in which to delete.

Name

Text

Yes

(Empty)

SNAPNAME="Snapshot3"

The user-defined name for the snapshot.

Timeout (seconds)

Number

No

60

TIMEOUT="50"

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

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 allows you to 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 and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

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: Delete snapshot "Snapshot2" of virtual machine "F:\Virtual Machines\Windows 7 x86\Windows 7.vmx". Use default VM session.

 

<AMVMWAREVM ACTIVITY="delete_snapshot" VMPATH="F:\Virtual Machines\Windows 7 x86\Windows 7.vmx" SNAPNAME="Snapshot2" />

 

↑ Top of Page