VMware Host - Disconnect

Declaration

<AMVMWAREVM ACTIVITY="disconnect" SESSION="text" />

Related Topics   

Description

Disconnects a virtual machine connection and ends a previously established session.

Practical Usage

See Description

Parameters

Connection

Property

Type

Required

Default

Markup

Description

Session

Text

Yes

(Empty)

SESSION="VMSession2"

The name of the session in which to disconnect.

 

Description

Error Causes

On Error

Example

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

Description

This sample task creates a VM session, powers on a VM image and creates a VM snapshot. Thereafter, it powers off the VM image and disconnects the VM connection. Comments are embedded to provide details about each operation.

<!-- 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 2003Enterprise x64\Windows Server 2003 Enterprise x64 Edition.vmx" LAUNCHGUI="YES" />

<!-- Create a snapshot -->

<AMVMWAREVM ACTIVITY="create_snapshot" SESSION="VMOpsSession1" VMPATH="F:\VirtualMachines\Windows 7 x86\Windows 7.vmx" SNAPNAME="Test_Snapshot" SNAPDESC="Create a snapshot" INCLUDEMEMORY="YES" />

<!-- Power off virtual machine -->

<AMVMWAREVM ACTIVITY="poweroff_vm" SESSION="VMOpsSession1" VMPATH="F:\Virtual Machines\Windows7 x86\Windows 7.vmx" TIMEOUT="3" OPENVMTIMEOUT="3" SOFT="YES" TOOLSTIMEOUT="3" />

<!-- Disconnect virtual machine connection / End session -->

<AMVMWAREVM ACTIVITY="disconnect" SESSION="VMOpsSession1" />