VMware Horizon View
A VMware Horizon for vSphere connector configuration contains the credentials and storage location the appliance needs to publish Layered Images to VMware Horizon View in your vSphere environment.
You can publish Layered Images to be used in any of the following pools:
- A Horizon View Composer Linked Clone Desktop Pool.
- A Horizon View Instant Clone Desktop Pool.
In the Connector Configuration wizard, be sure to configure a Virtual Machine Template, so that the Layered Image you publish will be in a ready-to-use VM, the image shut down and a snapshot taken. You can use the VM in your Horizon environment without further modifications. For example, if you are publishing a Layered Image to a Linked Clone Desktop Pool, the Layered Image becomes a ‘Parent VM’ that you can select for your Linked Clones pool.
Each connector configuration is set to publish Layered Images to a specific storage location in your vSphere environment, so you may need more than one VMware Horizon connector configuration if publishing to multiple locations. Further, you may want to publish each Layered Image to a location convenient to the systems you will be provisioning with the published image. For more about connectors, and connector configurations, see Connector configurations.
This Connector configuration is for publishing Layered Images only. (You cannot package Layers using this connector.)
Personal vDisks are not supported for View. The published desktop images will be non-persistent. Currently, vDisks can only be used when publishing to Citrix Provisioning.
When installing the Horizon Agent on the VM, select the custom setup option as follows:
- Select the VMware Horizon View Composer Agent option when deploying View Composer linked-clone desktops.
- Select the VMware Horizon Instant Clone Agent option when deploying instant-clone desktops.
Before you start
The first time you create an image template for publishing layered images to a location in your Horizon environment, you will create a connector configuration for that location.
Required information for this connector configuration
The connector configuration wizard lets you browse for the vCenter Server, Data Store, and Host to use for a new configuration.
The fields are case sensitive, so any values that you enter manually must match the case of the object your environment, or the validation will fail.
- Name- A useful name to help identify and keep track of this connector configuration.
- vCenter Server- The name of the vSphere server with which the appliance will integrate.
- vCenter User Name- The user name of the account that the appliance will use to connect to vSphere.
- vCenter Password- The password of the account that the appliance will use to connect to vSphere.
- DataCenter Name- The name of the vSphere DataCenter in which the appliance will create and retrieve virtual machines.
- Virtual Machine Template (recommended, required for UEFI virtual machines)- Virtual Machine Template that can be used to clone a VM with the hardware settings for View, including memory, CPUs and video settings. You can specify the host, datastore and network for configuring the resulting VMs. The list of choices contains only custom virtual machine templates, rather than actual virtual machines or any of the built-in templates. The OS version used by the selected template must match the OS version that you are using for publishing layered images. The template must not have any disks attached, and must have at least one network card attached. If it does not, you receive an error when trying to validate or save the configuration.
- ESXHost Name- The name of the vSphere ESX Host on which the appliance will create and retrieve virtual machines.
- DataStore Name- The name of the vSphere DataStore in which the appliance will create and retrieve virtual machines.
- Network Name- The name of the vSphere Network in which the appliance will create and retrieve virtual machines.
- Virtual Machine Folder Name- The name of the vSphere Folder in which the appliance will create and retrieve virtual machines.
Offload Compositing - Enables the layer packaging or image publishing process to run on the specified server. This feature increases performance, and it allows you to use VHDX disk format and either BIOS or UEFI virtual machines. When Offload Compositing is selected:
- If you do not provide a virtual machine template, the virtual machine defaults to BIOS.
- If you provide a template configured for BIOS or UEFI, the resulting virtual machine is the type you chose. When Offload Compositing is NOT selected:
- If you do NOT provide a template, the virtual machine defaults to BIOS.
- If you provide a template configured for BIOS, the resulting virtual machine is BIOS.
- If you provide a template configured for UEFI, the machine fails to boot, and results in a blue screen.
Create a connector configuration
To enter values:
- The first three vCenter fields must be entered manually. Once the credentials in those fields are validated, you can select values for the remaining fields from drop-down menus.
- To enter values manually: Click to put the cursor in the field and type the value.
- To select a value from a drop-down list: Click once to put the cursor in the field, and a second time to choose from a list of possible values.
To add a new connector configuration
- In Settings and configuration, select the Connectors tab and select Add Connector configuration.
- Below the list of connector configurations, click the New button. This opens a small dialog box.
- 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.
- Enter the configuration Name, and the vCenter Server,vCenter User Name, and vCenter Password). For guidance, see the above field definitions.
- Click the CHECKCREDENTIALS button below the vCenter fields. The DataCenter field is then enabled with a list of DataCenters available.
- Select the DataCenter, and the remaining dropdowns will be enabled.
- (Recommended) Select a virtual machine to use as the template. Although a VMTemplate is optional, it is strongly recommended.
- Complete the remaining fields and click the TEST button to verify that the appliance can access the location specified using the credentials supplied.
- 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 an Agent. The scripts must be stored on the same machine that the App Layering Agent is installed on, and will only run 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 also contain information needed to identify the virtual machine created as part of the published layered image in vSphere.
The running of these scripts will not affect the outcome of the publish job, and progress of commands run in the script will not be visible. The vSphere connector logs will contain the output of the script that runs.
Configure a Script
Remember that this procedure 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.
Complete and save the connector configuration as described above.
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.
Script Configuration fields
- Enable script- Select this check box to enable the remaining fields. This allows you to enter a script that will run each time a Layered Image is published.
- Script Agent- The agent machine where the scripts will be located and run from.
- Username (optional)- The user name toimpersonatewhen running the script. This can be used to ensure the script runs in the context of a user that has the needed rights/permissions to perform the operations in the script.
- Password (optional)- The password for the specified user name.
- Path- A full path and filename on the agent machine where the script file resides.
Other Script Configuration values
When the script is run, the following variables are set and can be used in the PowerShell script:
|Value||Applies to connector types||Valued determined by which code||Description|
|connectorCfgName||All||Common code||The name of the connector configuration with which the script configuration is associated.|
|imageName||All||Common code||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||vSphere connector code||The vCenter server specified in the connector configuration.|
|vName||All||vSphere connector code||The name of the virtual machine.|
|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.|
The 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, the App Layering service 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.