Update
This package is now available on the official feed!
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
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:
- 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.
- 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}.
- 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.
- 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