You are here: Learn about Citrix App Layering [UnideskVersion Layering 4.0.8] > Connectors > Add Connector Configuration > Citrix XenServer

Connector Configuration & Optional Script (Citrix XenServer)

In this article:

Before you start

Create a Connector Configuration

Script Configuration (Optional, Advanced feature)

A Citrix XenServer Connector Configuration contains the credentials and storage location Unidesk needs to connect to Citrix XenServer.

Before you start

You can use your XenServer environment for creating Layers, and for publishing Layered Images. Each Connector Configuration accesses a specific storage location in your XenServer environment. You may need more than one XenServer Connector Configuration to access the correct location for each purpose. Further, you may want to publish each Layered Image to a location convenient to the system you will be provisioning with the published image. For more about Connectors, and Connector Configurations, see About Connectors.

Since XenServer uses a pod-like architecture where you, the administrator, interact with individual servers or clusters of servers, rather than with a central management server, you manage these pods via command line access or GUI management software like XenCenter which you install directly on your desktop and connect individually to each standalone host or to clusters of hosts.

If this is your first time using Unidesk

If this is your first time using Unidesk and you want to create Unidesk Layers using a XenServer VM, you will need a XenServer Connector within Unidesk. When publishing Layered Images to XenServer, you will need a Connector Configuration for each of your publishing locations as well.

The Create Layer and Publish Layered Image wizards each ask you to select a Connector Configuration. If you don't yet have the right Connector Configuration for the task, you can create one by clicking New on the Connector wizard tab (see details below).

Required information for XenServer Connector Configuration settings

The XenServer Connector Configuration wizard let's you browse for the XenCenter Server, Data Store, and Host to use for a new configuration.

Important: The fields are case sensitive, so any values that you enter manually must match the case of the object in XenServer, or the validation will fail.

Virtual Machine organization

XenServer allows for VMs to be organized either by folder or by tag. These organizational tools are optional when creating and managing VMs through XenCenter or other tools. Although XenServer Connector Configurations do not allow the administrator to specify folders or tags, the VMs created by the XenServer Connector, both Packaging Machines and published Layered Images, can utilize both organizational tools.

Tags

If the template specified in the XenServer connector configuration has any tags, then those tags will be carried over to any VM cloned from that template. Therefore all packaging VMs or published layered images will be tagged with the same tags that the template has. Additionally, the XenServer connector will add three tags.

If you are using XenCenter, you can view your VMs by tag by selecting the "Organization Views" and then select "By Tag".

Folder

By default VMs created by the XenServer Connector will not be placed in a folder. However, if the template specified in the XenServer Connector Configuration resides in a folder, then any VM that the Connector creates from that template will also reside in the same folder. All packaging VMs and published Layered Images will be placed in that same folder. There will not be separate subfolders for packaging VMs or published Layered Iimages.

Machine network connectivity

The virtual network settings of the source template specified in the XenServer Connector Configuration will be carried over when creating any VMs through the XenServer Connector. There is no option in the Connector Configuration UI to override the network settings.

XenServer Clusters

The XenServer Connector does not yet work correctly with XenServer clusters. If the host specified in the configuration is part of a cluster, then it must be the master host in the cluster for the connector to work. However, this means that any time the master XenServer host goes down and a new master is elected, the XenServer configuration must be updated.

Scripts

The XenServer Connector supports script execution after publishing layered images just as the vSphere connectors do. The following script variables will be set:

Create a Connector Configuration

To enter values:

To add a new Connector Configuration:

  1. On the wizard for creating a Layer or for adding a Layer Version, click the Connector tab.
  2. Below the list of Connector Configurations, click the New button. This opens a small dialog box.
  3. Select the Connector Type for the platform and location where you are creating the Layer or publishing the image. Then click New to open the Connector Configuration page.
  4. Enter the configuration Name, and the XenServer Address, User Name, and Password). For guidance, see the above field definitions.
  5. Click the CHECK CREDENTIALS button below the XenServer Configuration fields. The Virtual Machine Clone Settings field is then enabled.
  6. Select the Virtual Machine Template.
  7. Select the Storage Repository and click the TEST button to verify that Unidesk can access the location specified using the credentials supplied.
  8. Click Save. The new Connector Configuration should now be listed on the Connector page.

Script Configuration (Optional, Advanced feature)

When creating a new Connector Configuration, you can configure an optional Powershell script to run on any Windows machine running a Unidesk Agent. These scripts must be stored on the same machine that the Unidesk Agent is installed on, and will only be executed after a successful deployment of a Layered Image.

Some preset variables are available to enable scripts to be reusable with different template images and different connector configurations. These variables will also contain information needed to identify the virtual machine created as part of the published Layered Image in XenServer.

Execution of these scripts will not affect the outcome of the publish job, and progress of commands executed in the script will not be visible. The XenServer connector logs will contain the output of the executed script.

Configure a Script (optional)

If you want a script to run each time a Layered Image is published, complete these steps using the values described in the sections that follow.

  1. Complete and save the Connector Configuration as described above.

    Note: Before selecting Script Configuration page, you must save (or discard) any edits to the Connector Configuration settings,

  2. If the Navigation menu on the left is not open, select it and click Script Configuration to open the Script Path page.

  3. Complete the required fields using the values detailed herein, and click Save.

Script Configuration fields

Other Script Configuration values

Powershell variables

When the script is executed the following variables will be set and can be used in the powershell script:

Value Applies to connector types: Value determined by which code: Description
connectorCfgName All Common code This is the name of the connector configuration that the script configuration is associated with.
imageName All Common code This is the name of the layered image template that was used to build/publish the layered image.
osType All Common code

This is the OS type of the layered image that was published. It can be one of the following values:

  • Windows7
  • Windows764
  • Windows200864
  • Windows201264
  • Windows10
  • Windows1064
virtualInfrastructureServer All XenServer connector code The XenServer host specified in the connector configuration.
vmName All XenServer connector code The name of the virtual machine that was created.
vmId All XenServer connector code The virtual machine UUID (same as vmUuid)
vmUuid All XenServer connector code The virtual machine UUID (same as vmId)

Definition Scope

Whether the scripts variable is set for all platform connector types or whether it is specific to a particular connector type.

Value Source

Whether the variable value is determined by common code or by platform connector specific code.