|
VMware Host - Delete snapshot |
Declaration
<AMVMWAREVM ACTIVITY="text" SNAPNAME="text" TIMEOUT="number" OPENVMTIMEOUT="number" /> |
Description
Deletes an existing virtual machine snapshot.
Practical Usage
Used to delete a snapshot, usually after saving a backup.
Parameters
Connection
Property |
Type |
Required |
Default |
Markup |
Description |
Connection |
--- |
--- |
--- |
--- |
Indicates where this activity's connection properties should originate from. Different parameters become active depending on the option selected. This is a visual parameter used only during design-time, therefore, contains no properties or markups. The available options are:
|
Session |
Text |
Yes if Connection set to Session |
VMOpsSession1 |
SESSION="VMO101" |
The name of a session (created in a previous Connect step) in which to link this activity. This parameter is active only if the Connection parameter is set to Session. |
Host type |
Text (options) |
Yes if Connection set to Host |
VIServer |
|
The type of VM host to establish a connection with. This parameter is active only if the Connection parameter is set to Host. The available options are:
|
Host name |
Text |
Yes |
(Empty) |
SERVER="host.server.com" |
The hostname 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="MsPacman" |
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="encrypted" |
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="50" |
The maximum time period in seconds during which a connection must be established between the guest and host, otherwise, the step times out. The default value is 60 seconds. |
Virtual Machine
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 value in seconds that this activity should wait for a response from the host. |
Example
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Description
This sample task deletes a VM snapshot named "test_snapshot."
<!-- Create virtual machine connection of host type "Workstation" / Create and start session named "VMOpsSession1" -->
<AMVMWAREVM ACTIVITY="connect" HOSTTYPE="Workstation" SESSION="VMOpsSession1" />
<!-- Power on virtual OS image -->
<AMVMWAREVM SESSION="VMOpsSession1" VMPATH="F:\Virtual Machines\Windows Server 2008 x64\Windows Server 2008 x64.vmx" LAUNCHGUI="YES" />
<!-- Delete snap shot -->
<AMVMWAREVM ACTIVITY="delete_snapshot" SESSION="VMOpsSession1" VMPATH="F:\Virtual Machines\Windows 10 x86\Windows 10.vmx" SNAPNAME="test_snapshot" />
<!-- Power off virtual machine -->
<AMVMWAREVM ACTIVITY="poweroff_vm" SESSION="VMOpsSession1" VMPATH="F:\Virtual Machines\Windows10 x86\Windows 10.vmx" TIMEOUT="3" OPENVMTIMEOUT="3" SOFT="YES" TOOLSTIMEOUT="3" />
<!-- Disconnect virtual machine connection / End session -->
<AMVMWAREVM ACTIVITY="disconnect" SESSION="VMOpsSession1" />