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

Connector Configuration & Optional Script (vSphere)

In this article:

Before you start

Create a Connector Configuration

Script Configuration (Optional, Advanced feature)

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

Before you start

You can use your vSphere environment for creating Layers, and for publishing Layered Images. Each Connector Configuration accesses a specific storage location. You may need more than one vSphere 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.

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 vSphere VM, you will need a vSphere Connector. If you are also publishing Layered Images to vSphere, you can create 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 (details below).

Required information for vSphere Connector Configuration settings

The vSphere Connector Configuration wizard let's you browse for the vCenter 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 vSphere, or the validation will fail.

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 vCenter Server, vCenter User Name, and vCenter Password). For guidance, see the above field definitions.
  5. Click the CHECK CREDENTIALS button below the vCenter fields. The DataCenter field is then enabled with a list of DataCenters available.
  6. Select the DataCenter, and the remaining dropdowns will be enabled.
  7. Complete the remaining fields 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 on any Windows machine running a Unidesk Agent—the same agent used on the PVS server. 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 vSphere.

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 vSphere connector logs will contain the output of the executed script.

Configure a Script (Remember, this is 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
  • Windows8
  • Windows864
  • Windows200864
  • Windows201264
  • Windows10
  • Windows1064
virtualInfrastructureServer All vSphere connector code The vCenter server specified in the connector configuration.
vmName All vSphere connector code The name of the virtual machine that was created.
vmId All vSphere connector code The virtual machine ID taken from the mobref of the vm (i.e. "vm-12345")
vmUuid All vSphere connector code The virtual machine UUID as set by the underlying highbrd.

User Impersonation

The Unidesk Agent, which runs as a service on a Windows machine, runs under either the local system account or the network account. Either of these accounts may have some special privileges, but they often are restricted when it comes to executing specific commands or seeing files in the file system. Therefore, Unidesk gives you the option of adding a domain user and password that can be used to "impersonate" a user. This means that the script can be executed as if that user had logged onto the system so that any commands or data will be accessible subject to those user rights and permissions. If no user name or password is entered, the script executes using the account under which the service is configured to run.

Script Execution Policy

Script execution policy requirements are generally up to you. If you intend to run unsigned scripts, you must configure the execution policy to one of the more lenient policies. However, if you sign your own scripts accordingly, you can choose to use a more restrictive execution policy.