|
VMware Host - Disconnect |
Declaration
<AMVMWAREVM ACTIVITY="disconnect" SESSION="text" /> |
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. |
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 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 2008 x64\Windows Server 2008 x64 .vmx" LAUNCHGUI="YES" />
<!-- Create a snapshot -->
<AMVMWAREVM ACTIVITY="create_snapshot" SESSION="VMOpsSession1" VMPATH="F:\VirtualMachines\Windows 10 x86\Windows 10.vmx" SNAPNAME="Test_Snapshot" SNAPDESC="Createasnapshot" INCLUDEMEMORY="YES" />
<!-- Power off virtual machine -->
<AMVMWAREVM ACTIVITY="poweroff_vm" SESSION="VMOpsSession1" VMPATH="F:\Virtual Machines\Windows 10 x86\Windows 10.vmx" TIMEOUT="3" OPENVMTIMEOUT="3" SOFT="YES" TOOLSTIMEOUT="3" />
<!-- Disconnect virtual machine connection / End session -->
<AMVMWAREVM ACTIVITY="disconnect" SESSION="VMOpsSession1" />