Update!
This activity is now available on the Official Stable Feed:
Learn more about it here
As a first step in our IT Automation roadmap, we’re excited to announce our VMware activities package is now available in public preview!
This initial set of 11 activities enable you to easily automate what we feel are the most critical IT actions, including the ability to provision virtual machines, power on/off virtual machines, and configure robots in (RPA) workflows.
How to provide feedback
Have suggestions, questions, or issues? We want to hear it!
- Simply go to the IT Automation (VMware) category
- And then click New Topic
Your feedback will be instrumental as we plan our roadmap and future releases.
How to install
UiPath.VMware.Activities package is available in Beta feed. Please follow the steps below to install the package in UiPath Studio:
- If you haven’t already, add the UiPath Beta feed to your Studio Manage Package window
- In the Beta feed, check ‘Include Prerelease’, search for “UiPath.VMware.Activities”, and install the latest version.
**Important - We must reiterate, make sure you check the ‘Include Prerelease’ checkbox
The VMware Activities should be visible now in UiPath Studio, as shown below:
Activities List
- VMware Scope – A container that provides a scope for VMware activities.
-
Datastores
- Get Datastore - Retrieves details of a given Datastore from a specified Host.
- Get Datastore List - Retrieves a list containing all the Datastores of a specified Host.
-
Hosts
- Get Host - Retrieves details of a given Host from the specified Datacenter.
- Get Host List - Retrieves a list of all the Hosts in a specified Datacenter.
-
Virtual Machines
- Create VM From Template – Creates a new virtual machine based on an existing virtual machine template.
- Customize VM – Customize the Guest OS of the given virtual machine.
- Get VM – Retrieves details about a virtual machine.
- Get VM List – Obtains the list of virtual machines from a given folder.
- Power On VM – Powers on a virtual machine.
- Power Off VM – Powers off a virtual machine.
- Restart VM – Restarts a virtual machine.
- Delete VM – Deletes a virtual machine from disk.
- Suspend VM - This activity suspends a running virtual machine.
- Rename VM - This activity renames a virtual machine.
- Move VM To Folder - This activity moves a virtual machine or template to a new location.
- Migrate VM - This activity migrates a virtual machine to another host and/or datastore.
- Get Template List - This activity obtains the list of templates from a given folder.
- Convert Template to VM - Converts a template to a virtual machine.
- Convert VM to Template - Converts a specified virtual machine to a template.
- Export OVF Template - This activity exports a virtual machine as an OVF Template.
- Deploy OVF Template - Deploys an OVF Template to a virtual machine.
- Configure Robot – Connects the Robot in the given virtual machine to Orchestrator.
- Run Program in VM – Runs a program inside a given virtual machine’s Guest OS.
-
Virtual Machines \ Snapshots
- Delete All VM Snapshots - Deletes all the snapshots of a specified virtual machine.
- Delete VM Snapshot - Deletes a specified snapshot of a virtual machine.
- Get VM Snapshot List - Retrieves all the snapshots of a specified virtual machine.
- Revert VM to Snapshot - Reverts a specified virtual machine to a given snapshot. If no snapshot is specified, the virtual machine remains unchanged.
- Take VM Snapshot - Creates a snapshot for a specified virtual machine.
Example Scenarios to Automate
These are some scenarios involving VMware activities that can be automated via UiPath Studio processes with this Activity Pack:
-
Green computing - A UiPath Studio process that powers off a list of VMware virtual machines in the evening and powers them on in the morning. In Orchestrator, you can schedule this process to run at a specific time.
-
Infrastructure Management - UiPath processes for on-demand management and maintenance of VMware virtual machines. Examples:
- Provisioning of a new server from a template (e.g. for a new application deployment, DevOps, etc.).
- Running a program / script inside a VMs Guest OS (e.g. for OS updates, applications deployment and patches).
- Reboot, power on/off (e.g. for applications and OS updates, resources efficiency).
- Robots Provisioning - A UiPath Studio process that creates N virtual machines and configures a Robot in each VM, connecting them to the Orchestrator. Steps:
- Create a Virtual Machine Template containing an installed UiPath Robot.
- Create a Customization Specification that will be used to customize the Guest OS of the virtual machines (e.g. hostname: same as virtual machine name, add machine to a specific domain, etc.)
- Create a process performing the following actions for each virtual machine:
a. Create a virtual machine based on the Virtual Machine Template and the Customization Specification.
b. In Orchestrator, provision a new Machine, provision a new Robot and add the Robot to a given Environment.
c. In the newly created virtual machine, connect the Robot to Orchestrator.
- Robots Autoscaling - A UiPath Studio process that powers on/off virtual machines containing Robots (that are part of a given Orchestrator Environment), based on the workload: when the number of items in a Queue increases above a threshold, a pre-configured new virtual machine is powered on in order to process items from that Queue.
How to use
Let’s create a UiPath Studio Process that powers off all running VMware virtual machines from a given folder of a vCenter Server.
- Let’s start by creating two Assets in Orchestrator. They will be used later in VMware Scope activity:
- vCenter_Address – representing the vCenter Server address.
- vCenter_AdminCredentials – the user credentials for connecting to the vCenter Server.
- Open UiPath Studio and start a new Process project. Give it a nice name and description, please.
- Add a new Sequence activity and retrieve the values of vCenter_Address and vCenter_AdminCredentials assets, using Orchestrator Get Asset and Get Credentials activities. The values of these assets are stored in vCenterAddress , vCenterUsername , and vCenterPassword variables.
- Now we need to add a VMware Scope activity and set the values for the required input parameters:
- vCenterServerAddress (String) - The address of the vCenter server, i.e. vCenterAddress.
- Username (String) - The username to perform VMware operations, i.e. vCenterUsername.
- Password (SecureString) - The password for the provided username, i.e. vCenterPassword.
- Let’s create a In Argument for our process called VMFolder . The value of this argument will be set in Orchestrator when running the process. It represents the folder where the virtual machines to be powered off reside. To exemplify, let’s set a default value for it: “DEV/VMs & Templates/TestFolder” , where DEV is a datacenter.
- Now we need a VMware Get VM List activity in order to retrieve the list of running virtual machines from VMFolder .
- Folder (String) - The folder where to search for virtual machines, VMFolder in our case.
- Include Subfolders (Boolean) – Let’s set it to ‘true’, so it will search for virtual machines recursively into the Folder ’s subfolders.
- PowerState (Enum) - Searches only for those virtual machines having the specified PowerState. Possible values are {All, PoweredOn, PoweredOff, Suspended} . In our case we are interested only in the virtual machines that are running , so we set the value to PoweredOn .
We also need a variable to store the result returned by Get VM List activity. Let’s call this variable vmList and set its type to VirtualMachineInfo[] .
- Finally, we need 2 more activities in order to complete the implementation:
- Parallel For Each – to asynchronously execute activities of each element in vmList , in parallel.
- VMware Power Off – this activity will be executed for each element in vmList . For Power Off activity, we choose to power off the machine by shutting down the Guest OS ( ShutdownGuestOS checkbox is selected). We are not interested in waiting for this operation to complete before moving on to the next activity, so we leave WaitForCompletion unchecked.
That’s all folks! You can run the process from UiPath Studio or publish it in Orchestrator and create a Job in order to execute it. Careful which VMFolder you specify, so that you don’t end-up powering-off more virtual machines than needed