Skip to main content
Matrix42 Self-Service Help Center

Matrix42 Workflow Studio: VMware Activities

 

Updating Matrix42 Workspace Management 8.1.0 to later versions will result in breaking all workflows that contain at least one of the previously implemented VMware activities (Get Power State of VMRestart Guest OS of VMResume VMShutdown Guest OS of VMStart VMStop VMSuspend VM). These activities have been updated in version 8.1.1. Due to the specifics of Workflow Studio, all relevant workflows should be recreated from scratch.

Prerequisites

To successfully use the VMware activities, you need to make sure that the following prerequisites are met:

  • PowerCLI 5.1 is installed and running on the Matrix42 Workspace Management server.
  • PowerShell 2.0 and .Net Framework 3.0 are installed on the vCenter Server host.

 

Open Connection

The activity establishes a connection to the VMware ESX server or vCenter and returns the output Session variable which contains the connection object and is used as an input property in other VMware activities.

Repository category: VMware

Properties:

Name

Description

ESX Server or vCenter

Name or IP address of the server where either ESX hypervisor or vCenter is running.

Password

Plaintext password.

User Name

Domain and username.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

List of Possible Exit Codes:

  • Success = 0
  • ParameterError = 100
  • ParsingError = 101
  • ParametrErrorAfterParsing = 102
  • TargetNameNotAssignable = 103
  • ConnectFailed = 110
  • ReadDetailsFailed = 302
  • StorageInformationNotAvaiable = 304
  • VMCreationFailed = 350
  • VMDeleteFailed = 351
  • VMStopFailed = 354
  • VMSuspendFailed = 355
  • VirtualMachineNotFound = 356
  • HyperVisorsInMaintenanceMode = 357
  • InvalidDataSoreToCreateVM = 358
  • VMSnapshotNotExist = 359
  • CouldNotDeleteSnapshot = 362
  • VirtualHardDiskCouldNotBeCreatedOnVM = 365
  • VirtualHardDiskCouldNotBeDeletedFromVM = 366
  • VMMemorySizeCouldNotBeChanged = 367
  • VMPropertyNotFound = 370
  • UnknownException = 402
  • VMAlreadyExist = 502
  • VMIsPoweredOn = 510
  • VMIsPoweredOff = 511
  • DisconnectFailed = 520
  • VMForDeleteNotExist = 531
  • VMIsAlreadySuspended = 535
  • VMwareToolsNotInstalled = 536
  • VmTemplateNotFound = 600
  • VmTemplateAlreadyExists = 601
  • TemplateDeleteFailed = 602
  • TemplateCreateFailed = 603
  • VmHostNotFound = 700

 

Close Connection

Closes the opened connection to the VMware ESX server or vCenter, thus it is no longer usable.

Repository category: VMware

Properties:

Name

Description

ESX Server or vCenter

Name or IP address of the server where either ESX hypervisor or vCenter is running.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Get Power State of VM

Retrieves the operational state of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of the virtual machine whose power state you want to retrieve.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Power State

Output variable with the operational state. Possible states are: OnOffSuspended, and Unknown.

Session

Connection object to the virtualization server.

 

Restart Guest OS of VM

Reboots guest operating systems of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of the virtual machine whose operating systems you want to restart.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Resume VM

Resumes a virtual machine from the suspended state.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of the virtual machine that should be resumed.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Shutdown Guest OS of VM

Gracefully shuts down guest operating systems of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of the virtual machine whose operating systems you want to shut down.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Start VM

Powers on a virtual machine that is in a powered-off state.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of the virtual machine that you want to power on.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Stop VM

Powers off a virtual machine with no consideration for running OS.

Repository category: VMware

Properties:

Name

Description

Check If Stopped

Defines whether to check that a virtual machine was stopped successfully. Possible values are 1 and 0. If the value is 0, the activity will try to stop a virtual machine once and then the workflow will execute the next activity. Otherwise, the activity will make several attempts to stop the virtual machine.

Virtual Machine ID

ID of the virtual machine that you want to shut down.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Suspend VM

Suspends a virtual machine to save its current state.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of the virtual machine that you want to suspend.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Find VM

Returns an enumeration of IDs of virtual machines.

Repository category: VMware

Properties:

Name

Description

Folder Name

String value. Location where the virtual machine(s) should be searched for. Complete path to the folder should be specified.

Virtual Machine ID

ID of a virtual machine if the activity should check whether this virtual machine exists.

Virtual Machine Name

Name of the virtual machine whose ID you want to retrieve. Use wildcards (asterisk) to search for several virtual machines whose names contain the specified text. Otherwise, only the exact matches will be returned.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

IDs of Found Virtual Machines

Output variable with an enumeration of the retrieved IDs.

Session

Connection object to the virtualization server.

 

Clone VM

Creates a copy of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Suffix

Text to be added at the end of the virtual machine name to create a name for the duplicate VM.

Virtual Machine ID

ID of a virtual machine that you want to clone.

Virtual Machine Name

Name of a virtual machine that you want to clone. Use wildcards (asterisk) to clone several virtual machines whose names contain the specified text. Otherwise, only the exact matches will be cloned.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

IDs of Created Virtual Machines

Output variable with an enumeration of IDs of the duplicate virtual machines.

Session

Connection object to the virtualization server.

 

Create Snapshot of VM

Creates a snapshot of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Preserve Memory State

Variable of the Int32 type. If the value is $true (1) and if the virtual machine is powered on, the virtual machine's memory state is preserved with the snapshot.

Quiesce

Variable of the Int32 type. If the value is $true (1) and the virtual machine is powered on, VMware Tools are used to pause running processes on the guest operating system.

Snapshot Description

Additional information about a snapshot to be taken (date and time, etc.).

Snapshot Name

Name of a snapshot to be taken.

Virtual Machine ID

ID of a virtual machine whose snapshot you want to take.

DisplayName

Understandable name of the activity.

Snapshot ID

Output variable with an ID of the created snapshot.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Get CPU Count of VM

Retrieves the quantity of cores of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of a virtual machine whose CPU count you want to get.

DisplayName

Understandable name of the activity.

CPU Count

Output variable of the Int32 type with a quantity of cores.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Get Memory Size of VM

Retrieves the memory size in MB of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of a virtual machine whose CPU count you want to get.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Memory Size

Output variable of the Int32 type with the retrieved memory size in MB.

Session

Connection object to the virtualization server.

 

Find VM Template

Returns an enumeration of IDs of virtual machine templates.

Repository category: VMware

Properties:

Name

Description

Folder Name

String value. Location where the template(s) should be searched for. Complete path to the folder should be specified.

Template ID

ID of a template if the activity should check whether this template exists.

Template Name

Name of the template whose ID you want to retrieve. Use wildcards (asterisk) to search for several templates whose names contain the specified text. Otherwise, only the exact matches will be returned.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

IDs of Found Templates

Output variable with an enumeration of the retrieved IDs.

Session

Connection object to the virtualization server.

 

Revert VM to Snapshot

Restores the parent snapshot of the current state of a virtual machine.

Reverting to a snapshot shuts down the virtual machine. To power it on, use the Start VM activity.

Repository category: VMware

Properties:

Name

Description

Snapshot Name

Name of a snapshot to which a virtual machine should be reverted.

Virtual Machine ID

ID of a virtual machine that you want to revert to the specified snapshot.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Create VM from Template

Creates a virtual machine based on the specified template.

Repository category: VMware

Properties:

Name

Description

Host Name

Specify the host computer where a virtual machine should be created. It is recommended to enter the IP address of the host.

Template ID

ID of a virtual machine template.

Virtual Machine Name

Specify a name for a new virtual machine.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Virtual Machine ID

Output variable with an ID of the created virtual machine.

Session

Connection object to the virtualization server.

 

Create Template from VM

Creates a virtual machine template based on the specified virtual machine.

A template can be created only from a virtual machine that is not powered on.

Repository category: VMware

Properties:

Name

Description

Template Name

Specify a name for a new virtual machine template.

Virtual Machine ID

Id of a virtual machine which you want to create a template from.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Template ID

Output variable with an ID of the created template.

Session

Connection object to the virtualization server.

 

Set Memory Size of VM

Sets the memory size of a virtual machine to the specified amount in MB.

Memory size can be set only for a virtual machine that is powered off.

Repository category: VMware

Properties:

Name

Description

Memory Size (MB)

Value of the Int32 type. Specify the memory size in MB. Memory size should be divisible by four.

Virtual Machine ID

ID of a virtual machine whose memory size you want to modify.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Delete VM Template

Deletes a template of a virtual machine.

Repository category: VMware

Properties:

Name

Description

Template ID

ID of a template to be deleted.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Set CPU Count of VM

Sets the CPU count of a virtual machine to the specified quantity of cores.

CPU count can be set only for a virtual machine that is powered off.

Repository category: VMware

Properties:

Name

Description

CPU Count

Value of the Int32 type. Specify the quantity of cores.

Virtual Machine ID

ID of a virtual machine whose CPU count you want to modify.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Delete VM

Deletes a virtual machine.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of a virtual machine to be deleted.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.

 

Move VM to Host

Moves a virtual machine to a specified host computer.

Repository category: VMware

Properties:

Name

Description

Virtual Machine ID

ID of a virtual machine to be moved.

Host Name

Name of a computer where you want to move the virtual machine. It is recommended to enter the IP address of the host.

DisplayName

Understandable name of the activity.

Exit Code

The return code of the activity. It is a number generated when the activity has finished executing.

Session

Connection object to the virtualization server.