Citrix Activities are now in Public Preview

Description

UiPath.Citrix.Activities package offers activities for XenServer 7.x and Citrix Hypervisor 8.0 virtualized infrastructures.

This initial set of 20+ activities enables IT Departments to easily automate processes for on-demand management and maintenance of Citrix virtual machines:

  • provision a new server from a template (e.g. for a new application deployment, DevOps, etc.).
  • take snapshots of the virtual machines before installing update packages or different versions of a program.
  • reboot, power on/off (e.g. for applications and OS updates, resources efficiency).

Activities List

Server Virtualization \ Citrix
Citrix Scope
– Connects to a Citrix Hypervisor server and provides a scope for other Citrix activities.

Server Virtualization \ Citrix \ Virtual Machines
Create VM From Template –
Creates a new virtual machine based on an existing template.
Get VM by UUID – Retrieves the details of the specified virtual machine or template.
Get VM List – Retrieves a list of virtual machines.
Get Template List – Retrieves a list of templates.
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 specified virtual machine or template.
Rename VM – Renames a virtual machine or template.
Suspend VM – Suspends a running virtual machine.
Resume VM – Resumes a suspended virtual machine.

Server Virtualization \ Citrix \ Virtual Machines \ Snapshots
Take VM Snapshot
– Takes a snapshot of the specified virtual machine.
Get VM Snapshot List – Retrieves all snapshots of the specified virtual machine.
Delete VM Snapshot – Deletes a given snapshot of the specified virtual machine.
Delete All VM Snapshots – Deletes all snapshots of the specified virtual machine.
Revert VM to Snapshot – Reverts the virtual machine to a specified snapshot.

Server Virtualization \ Citrix \ Virtual Machines \ Organization
Add Tag to VM
– Add a tag to the specified virtual machine or template.
Remove Tag from VM – Remove a tag from the specified virtual machine or template.
Add VM to Folder – Adds the specified virtual machine or template to a folder.
Remove VM from Folder – Removes the specified virtual machine or template from a folder.

Server Virtualization \ Citrix \ Servers
Get Server List
– Retrieves the list of all Citrix Hypervisor Servers from the pool associated with the current session.
Get Storage Repositories – Retrieves details about the storage repositories associated with a Citrix Hypervisor Server.

How to install

UiPath.Citrix.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.Citrix.Activities”, and install the latest version.
** Important - We must reiterate, make sure you check the ‘Include Prerelease’ checkbox :blush:

Citrix Activities should be visible now in UiPath Studio, as shown below:

How to use

The sample workflows below show how to use Citrix activities in practice.

Virtual machines management

This UiPath process contains two workflows exemplifying how to provision new virtual machines and how to power off the ones that are not required to be On at a specific time (e.g. trigger workflow nightly to save power, compute resources).

  • CreateVirtualMachines : creates three virtual machines based on a template. Two of them have the tag “AlwaysOn” and one is tagged with “NotAlwaysOn”.
  • PowerOffVirtualMachines : powers off all running virtual machines tagged with “NotAlwaysOn”.

VirtualMachinesManagement.zip (16.2 KB)

Take VM snapshot before updating an application

This UiPath process retrieves all virtual machines tagged with “ABCApp_1.1”, takes a snapshot for each virtual machine in this list, and creates a .csv file report containing details about the newly created snapshots. This workflow can be run before installing an update package or a different version of a program (eg. “ABCApp_1.1” - > “ABCApp_1.2”), so you can revert the VM to the snapshot in case something goes wrong.

VMSnapshots.zip (12.4 KB)

To exemplify, let’s go step by step through the process of creating this workflow:

  1. First, add a Citrix Scope activity and set the values for the input parameters like in the screenshot below. Here is the description of this activity’s parameters:
  • CitrixHypervisorServer (String) - The host name or IP address of the Citrix Hypervisor Server. For example: 182.31.32.28 or belt.orion.com.
  • Username (String) - The username to perform Citrix operations.
  • Password (SecureString) - The password for the provided username.
  • Port (Numeric) - The port of the Citrix Hypervisor Server.
  1. Add Get VM List activity to retrieve the virtual machines tagged with “ABCApp_1.1”. The list of virtual machines matching the filter is stored in VMList variable. The relevant parameters are:
  • FilterBy (Enum) - The property to filter by. Possible values are {All, Name, Folder, Tag}.
  • FilterValue (String) - The value for the property to filter by. Not taken into consideration if the value of FilterBy is All.
  • PowerState (Enum) - Searches only for those virtual machines having the specified PowerState. Possible values are {All, Halted, Paused, Running, Suspended, Unknown}.
  1. For each virtual machine in VMList, let’s take a snapshot using Take VM Snapshot activity. In addition, we store the information about each snapshot in SnapshotsDataTable (DataTable). The complete list of the parameters for Take VM Snapshot activity is:
  • VirtualMachine (VirtualMachine) - The virtual machine on which the operation will be performed.
  • SnapshotName (String) - The name of the snapshot to be created.
  • SnapshotDescription (String) - The description of the snapshot.
  • SnapshotVMMemory (Boolean) - Indicates whether to snapshot the virtual machine’s memory in addition to virtual machine’s disks. If the virtual machine is powered off, this flag is ignored.
  • Quiesce (Boolean): Indicates whether to quiesce the virtual machine before taking the snapshot. If the virtual machine is powered off or Citrix VM Tools are not available, this flag is ignored.
  • WaitForCompletion (Boolean) - If set to ‘true’, the activity waits to complete before moving to the next activity, but no longer than the value specified in Timeout field.
  • Timeout (seconds) - Specifies the amount of time (in seconds) to wait for the activity to run before an error is thrown. The default value is 300 seconds (5 minutes). Taken into consideration in case Wait For Completion = True.
  1. Finally, let’s use Write CSV activity to save the SnapshotsDataTable as a .csv file. The resulted Snapshots.csv file looks like the one from below.
    That’s all folks! Enjoy :blush:

20 Likes

Great work as usual UiPath! Can’t wait to test out all of these activities

2 Likes

Thanks @srdjan.suc. Please test them and provide us feedback :slight_smile:

3 Likes

Hi ,
Great work. Here I can see more and more activities. You are really great man…

Regards
Balamurugan.S

2 Likes

Wow really needed them
Thanks for adding them @ovidiuponoran :slight_smile:

2 Likes

Thanks @Shubham_Varshney. Please let me know if there are aditional activities that you think are needed in order to support the scenarios you have in mind to implement.

1 Like

Thanks @balupad14. Please let me know if you think there are additional Citrix activities that would be helpful.

2 Likes

Thanks for adding them !!

1 Like

Excellent addition to set of activities!

2 Likes