|
VMware Host - Pause |
Declaration
<AMVMWAREVM ACTIVITY="pause_vm" VMPATH="text" TIMEOUT="number" OPENVMTIMEOUT="number" /> |
Description
Pauses the specified virtual machine. When a virtual machine is paused, its state is saved to memory and the running operations will not be restarted as long as they have no persistent communication with other computers. All the settings in the virtual machine, and all the devices, such as CPUs, VIFs, amount of memory, and so on, remain the same.
Practical Usage
Can be used to pause operations on a virtual machine, move or copy that VM to another physical computer, and then resume execution exactly at the point of suspension.
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 the VM session (created in a previous 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:\VMFolder\VMfile.vmx" |
The absolute path of the virtual machine configuration (.vmx) file in which to pause. 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 VMwar Workstation for local connections. |
Timeout (seconds) |
Number |
No |
60 |
TIMEOUT="5" |
The maximum time period in seconds that this activity waits for a response from the host before a time out error occurs. |
Open VM timeout (seconds) |
Number |
No |
60 |
OPENVMTIMEOUT="5" |
The maximum time period in seconds that this activity must successfully connect to the specified VMware object before a time out error occurs. |
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 pauses a VM, waits 60 seconds and un-pauses the VM.
<!-- Create virtual machine connection of host type "Workstation" / Create and start session named "VMOpsSession1" -->
<AMVMWAREVM ACTIVITY="connect" HOSTTYPE="Workstation" SESSION="VMOpsSession1" />
<!-- Pause virtual machine -->
<AMVMWAREVM ACTIVITY="pause_vm" SESSION="VMOpsSession1" VMPATH="F:\Virtual Machines\Windows 10 x86\Windows 10.vmx" />
<!-- Wait 60 seconds -->
<AMWAIT SCALAR="60" />
<!-- Un pause virtual machine -->
<AMVMWAREVM ACTIVITY="unpause_vm" HOSTTYPE="VIServer" VMPATH="F:\Virtual Machines\Windows 10 x86\Windows 10.vmx" />
<!-- Disconnect virtual machine connection /> End session -->
<AMVMWAREVM ACTIVITY="disconnect" SESSION="VMOpsSession1" />