In this article:
A PVS Connector Configuration contains the credentials and storage location Unidesk needs to connect to PVS, and it identifies the properties to be associated with the vDisk.
Each Connector Configuration is set up to access a storage location via a specific account. For more about Connectors and Connector Configurations, see About Connectors and Connector Configurations.
The first time you create an Image Template for publishing Layered Images to your PVS environment, add a PVS Connector Configuration for that PVS location.
For Unidesk to work correctly with PVS, the PVS services must be running as a domain account. This is because domain accounts have permissions to access the PVS store and the local system account does not.
If your PVS server is configured to use the local system account, which is the default setting, you can change the account by running the PVS configuration tool. This tool gives you an option to run as local system or use a domain account. Choose a domain account.
For Unidesk to access the location in your PVS environment where you want to publish a Layered Image, you need to supply the credentials and location in a PVS Connector Configuration.
The information you need for the PVS Connector Configuration includes.
When choosing a Write Cache option, consult your PVS documentation to ensure that the PVS Servers and target devices that use this vDisk are properly configured for the type you select.
If you don't yet have a Connector Configuration that includes the PVS server information and credentials for the server where the Layered Image will be published, add one now.
To add a new Connector Configuration:
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 PVS.
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 PVS connector logs will contain the output of the executed script.
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.
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,
If the Navigation menu on the left is not open, select it and click Script Configuration to open the Script Path page.
Complete the required fields using the values detailed herein, and click Save.
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:
|
diskLocatorId | All | PVS | The internal id for the vDisk. |
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 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.