How to configure Citrix Universal Print Server with Citrix VDI-in-a-box 5.1

This Citrix article explains how to configure Citrix Universal Print Server with Citrix VDI-in-box 5.1 and the goal is make your VDI be able to print from on any printer device.

Summary

Printing with VDI-in-a-Box

Requirements

Requirements for completing the task. This includes specific knowledge and/or hardware and software requirements:

• VDI-in-a-Box 5.1 (or later) grid

• Citrix Universal Print Server 1.0 (or later)

• At least one network or local printer, depending on use case.

• Windows 2008R2 Server with domain and printing services, depending on use case.

Background

This document is intended to provide information regarding different printing concepts with VDI-in-a-Box. We will cover the different methods of installing print drivers in the virtual desktops, printer redirection, and location-based printing. Depending on the deployment environment, checking one box can configure printing, or it can be more complicated where different printers and drivers need to be used.

Procedure

Printer Redirection

This section describes the simplest method available: enabling printer redirection. Enabling this feature will connect all the printers available on the client device into the virtual desktop. This works for all types of printers including local, network, or even wireless. Since these printers are already configured on the client device there is no need to configure or install drivers on the virtual desktops.

Printer Redirection is a great feature but does not resolve all customer’s needs, hence the need for other types of printing options described in this document. In many cases there will be thin clients, mobile devices, or personal computers that do not have the ability to use required printers. An administrator can always combine the Printer Redirection method with any of the other methods described later in this document.

How to configure Printer Redirection in VDI-in-a-Box:

Printer Drivers

This section describes the two methods available to use print drivers within VDI-in-a-Box: The Citrix Universal Print Server (Citrix UPS) or vendor/native print drivers. Depending on how HDX print policies are configured it is possible to use a combination of native drivers and Citrix UPS. This might be necessary when Citrix UPS is used by a majority of printers, while some specialty printers may require native print drivers. Any combination of these print drivers can be used with the deployment methods described later in this document.

Citrix Universal Print Server

The Citrix UPS can be used to reduce print driver clutter and to improve bandwidth consumption during print jobs. This allows for a single “generic” driver called the Citrix Universal Print Driver to be used on the VDI-in-a-Box virtual desktops. With the exception of some specialty printers, this solution will work with almost all printers (local, network, wireless). Citrix UPS has several components that work together to accomplish this:

• Citrix UPS Server running on a Windows Server with the Print and Document Services role.

• Citrix HDX Group Policy Management running on a Windows domain controller.

• Citrix UPS Client agent running on the VDI-in-a-Box golden image(s).

Please reference http://support.citrix.com/proddocs/topic/technologies/ps-printing-universal-network.html for specific installation instructions. These may change with updates to the Citrix UPS product but we will discuss the basic workflow to get it working with VDI-in-a-Box. The instructions below assume the same Windows 2008R2 Server will be used to be a domain controller and print server:

1. Download the latest Citrix UPS package from http://citrix.com.

2. Unzip the contents and place on a network share for easy access.

3. Install the Citrix HDX Group Policy Management package onto the Windows 2008R2 Server.

4. Install the Citrix UPS Server package onto the same Windows 2008R2 Server. This will also enable the Printing and Document Services role.

5. Create or Edit a VDI-in-a-Box golden image.

6. Log into the draft image as an administrator.

7. Connect to the network share to access the Citrix UPS package.

8. Install the Citrix UPS Client package onto the desktop.

9. Log out of the golden image.

10. Configure a Citrix HDX Printing Group Policy.

11. Test and publish the golden image.

Complete the following steps if the Citrix Print Manager service does not start on the VDI-in-a-Box desktops after being published. This can be verified by logging into a desktop, opening services.msc, and confirming the Citrix Print Manager Service is started. The following instructions will use Windows Task Scheduler to start the Citrix Print Manager service on the desktops, but Group Policy and logon scripts can be used instead.

12. Edit the golden image.

13. Log into the draft image using as an administrator.

14. Create a new batch file containing the file command:

net start cpsvc

15. Save the batch file into a location such as the C:\ drive (not in the administrator’s profile).

16. Open Windows Task Scheduler.

17. Create a New Task and give it a name such as Citrix Print Service.

a. General Tab: For Security options change the User or Group to include all domain users and to run whether user is logged on or not. Select the correct operating system in the Configure for dropdown menu.

b. Triggers Tab: Select the option to begin the task at startup.

c. Action Tab: Select the option to start a program. Click Browse and select the batch file created in the earlier step.

18. Save the Citrix Print Service Task.

19. Save/Publish the Golden Image and verify the task runs as scheduled.

20. Once logged into a published desktop, open services.msc from the Windows Start menu and confirm the Citrix Print Manager Service is started.

Vendor Drivers

This method is typically used if the Citrix UPS is not used or if there is a specialty printing device which the Citrix universal print driver does not work with. If the only option is to install the vendor drivers it would be done in the same manner as on physical computer. Another reason for native vendor drivers is when deploying VDI-in-a-Box in workgroup mode and no Active Directory exists in the environment. This will work with local, network, and wireless printers.

In most cases to reduce the need for end-user interaction, it is possible to install the print drivers on the VDI-in-a-Box golden image. If using a print server it is also possible to deploy the drivers (discussed later in this document) from the server. In a print server scenario it is not necessary to always install the drivers in the golden image as the drivers will be installed during user sessions when a printer is connected. However, this can consume additional bandwidth and there could be permission issues if the user is not able to install software/drivers onto the virtual desktop.

The primary benefit of installing vendor-specific drivers is full support and functionality of printer features. There are some printers that have advanced functionality that may not work if using a generic driver, thus, the vendor driver should be used instead. It is recommended to stay with Citrix UPS and only fallback to native drivers if certain printing functionality is desired.

Location-Based Printing

There are several methods available to assign printers to specific computers or users in Active Directory. The methods described in this document usually require a Windows Server with the Print and Documents Services role in combination with any sort of print driver (vendor or Citrix Universal Printing) and HDX Group Policy Management.

Location-Based Printing, also known as Proximity printing, allows an administrator to ease the burden of printer deployments in VDI. In many cases the user will need to access a different printer, typically based on the client’s physical location or possibly Active Directory membership. 3rd party print management software can also handle location-based printing but will not be discussed in this document.

Windows Server Printer Deployments

Active Directory and Group Policy allow administrators to configure location-based printing without the need for 3rd party solutions. The methods described in this document may not work well in all environments but administrators can take this information and apply it using other means. There are two basic requirements for deploying printers using these methods: (1) Windows Server domain controller, (2) Windows Server with Print and Documents Services role. These roles do not have to reside on the same Windows Server but there is not technical limitation preventing one from doing so.

The first step is to decide what type of drivers to use for the VDI-in-a-Box virtual desktops. Review the Print Drivers section earlier in this document to decide if vendor drivers or the Citrix Universal Print Service will be a better choice. In most cases it is recommended to use Citrix UPS to reduce print driver clutter and reduce bandwidth consumption when print jobs are in progress. The steps describes in this section will be the same regardless of the type of print driver one decides to use.

The next step in the process is deciding how printers will be assigned. If all VDI-in-a-Box golden images are joined to the same OU within Active Directory, most likely you will filter printing policies based on group membership. For the time being, OU assignments are configured at the golden image level within VDI-in-a-Box. Until this is changed to the template level, an administrator would be required to create a new golden image for each OU if filtering policies based on this requirement. This is not sustainable until VDI-in-a-Box allows OU assignment to be at the template level instead.

For smaller VDI-in-a-Box deployments it might make sense to filter group policy based on OU. For example, take a customer who has 3 distinct user types requiring 3 golden images (each image having vastly difference types of installed applications). The VDI-in-a-Box administrator can create a parent called VDI-Desktops, and 3 child OUs such as Finance, Sales, Engineering. The 3 golden images would be joined to the respective OU’s within Active Directory and printing group policies can be assigned to each OU.

For most VDI-in-a-Box deployments it is easier to assign printing group policies on group membership. In many cases there might only be a single (or a few) golden images, all joined to the same OU. The administrator can create a GPO for each set of printers to be used by specific groups of users. This is a good solution when network printers are already deployed by location based on group membership. An example would when printers are deployed by department because those users typically sit near each other. In such a case the administrator would create a GPO with an assigned printer and then filter it based on group membership. This way each member of the group will have access to the printer(s) from the VDI-in-a-Box virtual desktop.

The following section describes a VDI-in-a-Box deployment where Windows Server 2008R2 is used as a domain controller and print server. The Citrix Universal Print Server has been installed and configured to reduce print driver clutter, and the administrator has decided to deploy network printers to the virtual desktops based on Active Directory group membership. Each department already has their own network printer(s) configured on the Windows Server using the Printer and Documents Services role.

1. Create an OU called VDI-Desktops. The DN is OU=VDI-Desktops,DC=company,DC=com.

2. Install the Citrix Universal Print Server components onto the Windows Server. This includes the HDX Group Policy Management component.

3. Install and configure VDI-in-a-Box with one golden image.

• Install the Citrix Universal Print Server Client agent.

• Prepare the image and join it to the VDI-Desktops OU.

4. Create templates for the three departments that will use ViaB desktops. Ensure the Printer Redirection item is disabled.

• Finance Desktop template.

• Marketing Desktop template.

• Inside Sales Desktop template.

5. Open Group Policy Management Editor on the domain controller.

6. Create a new GPO assigned to the VDI-Desktops OU and configure Citrix policy to use the Citrix Universal Print Server. Please refer to specific instructions found in the Citrix UPS section of this document.

7. Create a new GPO for each department in the VDI-Desktops OU and use a naming convention that is easy to understand, such as Finance – Citrix Printers.

8. Select each departmental printing GPO and adjust the Security Filtering to only include the respective groups. For example, remove Authenticated Users and add the Finance Security Group to the Finance – Citrix Printers GPO. Do this for all the departments.

9. Open the Print Management tool on the Windows Server.

10. Drill down to the Print Servers > Server Name > Printers section.

11. Right-click the printer used by the Finance department and select Deploy with Group Policy.

12. Click Browse in the Group Policy Object > GPO name section and select the Finance – Citrix Printer GPO found in the VDI-Desktops OU.

13. Select the option to deploy this printer to computers this GPO applies to and click Add.

14. Click OK and repeat steps 11-13 for each department.

15. Spin up desktops for each VDI-in-a-Box template.

16. Log into each of the departmental desktops to confirm the printer(s) have been installed and can be used by printing a test page.

This example can be used as a basis if such policies do not already exist, but can be altered to fit the needs of any particular environment. Aside from the Citrix HDX Printing GPO describes later in this document, deploying prints via Active Directory is one of the best methods available. It allows for central management of all network printers and the ability to make policy changes without much effort.

Assigning printers based on group or computer membership can be more reliable than basing the policies on client IP addresses. Why? Let’s say an organization only has one subnet for client devices and is using DHCP without reservations. The client IP addresses will change consistently so it will not be possibly to apply policies based on client IP addresses. Assigning printers based on client IP address is most useful if using Static IP addresses, segmented DHCP scopes (or Static/reserved IP addresses) for specific locations or departments, or in kiosk-type situations. In most cases a library or school lab will have static IP addresses for the client, thus it is possible to assign these types of policies.

Windows Logon Scripts

It is possible to write custom logon scripts to connect network printers based on client location. This document does not describe the type of script to use as this will greatly vary amongst deployments. VDI-in-a-Box writes the client device IP address into the registry, allowing an administrator to use a script to assign a network printer based on this registry key. This solution can be used with most typical network print server deployments or the Citrix Universal Print Server.

The client IP address is written to the following registry location:

HKEY_LOCAL_MACHINE\SOFTWARE\Kaviza\dtagent\endPointAddress

The data field for endPointAddress can be extracted and used by a script. An example would be a school with Computer Science and Biology labs where students are able to bring their own laptops. Each lab has its own DHCP scope, allowing the administrator to write a script that assigns the Computer Science network printer to VDI-in-a-Box desktops only when students are connected from the Computer Science network. The same will happen for the Biology lab, even if a student disconnects from the Computer Science lab and reconnects to the VDI-in-a-Box desktop from the Biology lab.

Citrix HDX Printing Group Policies

VDI-in-a-Box does not currently support the HDX polices to assign default printers, session printers, or assign printers based on client IP address. Other policies, including Citrix Universal Print Server polices, are supported by VDI-in-a-Box.

Source

CTX134348

Citrix Universal Print Server (Tech Preview)

My thoughts on Citrix Universal Print Server (UPS)

Citrix Universal Print Server Technical Preview is now available as a download at citrix.com

Citrix have talk about this product for many years, and now its here. When i was at Citrix Synergy SF in May  2011 i went to a session where Citrix talked about the Citrix Universal Print Server and that they where very close in releasing a build. In the audience there were 2 employes from ThinPrint and they didnt look happy when Citrix digg-in their product and what they would be able to solve regarding print.

Will Citrix be able to virtualise print server and eliminate the need for installing multiple printer drivers on XenApp/XenDesktop environments and all the issues we have been fighting with for many years. Well if they can do what ThinPrint and UniPrint does then this is a big step for Citrix and all customers that use Citrix.

Thomas Koetzing (CTP) have writen a great article about the Citrix Universal Print Server, how it works, the architecture and how you deploy it. I recommend you read it. Kudos to Mr. Koetzing
Read Thomas Koetzing article on Citrix UPS here

Citrix Universal Print Server explained:

The Citrix Universal Print Server Technical Preview extends XenApp 6.5 and XenDesktop 5.5 Universal printing support to network printing. This feature eliminates the need to install numerous network printer drivers on XenApp and XenDesktop hosts, and enables more efficient network utilization. The new Citrix Universal printer driver supports direct network printing on Windows and non-Windows clients.

After you install the Universal Print Server components and configure the new policy settings, a user can add and enumerate network printers through the Windows Provider and Citrix Provider interfaces. The Universal Print Server feature comprises a client component that you install on XenApp and XenDesktop hosts, and a print server component that you install on a print server.

System Requirements

Client component:

  • Supported on servers running XenDesktop 5.5 with a hotfix or XenApp 6.5 with a hotfix. For the Technical Preview, the required hotfixes are supplied with InstallServicePatchOnVDA.bat for XenDesktop 5.5 and InstallServicePatchOnXAServer.bat for XenApp 6.5.
  • The client component installer enables or installs the following items, if they are not already present:
    • Visual C++ 2005 SP1 and 2008 SP1 runtime libraries.
    • .NET 3.0 SP1 Framework. The installer requires this software.
    • Citrix Client-Side Extension. This is required to retrieve and configure Universal Print Server policy settings.

Server component:

  • Supported on Windows Server 2008 32-bit operating systems.
    • Do not install the server component on a server that has XenApp or XenDesktop installed.
    • Install all Windows updates before installing the server component.
  • The server component installer enables or installs the following items, if they are not already present:
    • Print server role. Enabling this role is provided as a convenience; if enabling this role fails, the installation proceeds normally.
    • Visual C++ 2005 SP1 and 2008 SP1 runtime libraries.
    • .NET 3.0 SP1 Framework. This is required for XPS printing. The installer requires this software.
    • Citrix Client-Side Extension. This is required to retrieve and configure Universal Print Server policy settings.

HowTo install the Universal Print Server Technical Preview Components

1. Download the Citrix Universal Print Server package, CitrixUniversalPrintSolution.zip.

This file contains:

• InstallServicePatchOnXAServer.bat

installs required software on the XenApp 6.5 host to support the Universal Print Server.

• InstallServicePatchOnVDA.bat

installs required software on the XenDesktop 5.5 host to support the Universal Print Server.

• InstallGroupPolicyPatchOnGPMC.bat

updates the Citrix Group Policy Management Console, which allows you to view and edit the new policy settings for the Universal Print Server.

• CitrixUPClient_SelfExtractor.exe

installs the Universal Print Server client component software on the XenApp 6.5 or XenDesktop 5.5 server.

• CitrixUPServer_SelfExtractor.exe

installs the Universal Print Server server component software on the Windows Server 2008 32-bit print server.

2. Copy the file to a shared folder on the network and extract the compressed files.

3. If you will use default installation locations when running

InstallServicePatchOnXAServer.bat, InstallServicePatchOnVDA.bat, and InstallGroupPolicyPatchOnGPMC.bat, skip this step.

If you are not using default installation locations, copy the following files (from the AMD64 subfolder for 64-bit systems, or the X86 subfolder for 32-bit systems):

• For XenApp hosts, copy cpsvc.exe from the XenApp subfolder to the Citrix \System32 folder of your installation.

• For XenDesktop hosts, copy cpsvc.exe from the VirtualDesktopAgent subfolder to the Citrix\IcaService folder of your installation.

• For the Group Policy Management Console, copy UpsPrintingPoliciesDataObj.dll from the GPMC subfolder to both of the following locations:

  • Citrix\Group Policy\Management\Extensions\
  • Citrix\Group Policy\Management\ExtensionsV2\

4. Save the components on the appropriate servers:

Save InstallServicePatchOnXAServer.bat and CitrixUPClient_SelfExtractor.exe on each XenApp host on which you want to install the Universal Print Server.

• Save InstallServicePatchOnVDA.bat and CitrixUPClient_SelfExtractor.exe on each XenDesktop host on which you want to install the Universal Print Server.

• Save InstallGroupPolicyPatchOnGPMC.bat on the XenApp or XenDesktop hosts where you use the Citrix Group Policy Management Console.

• Save CitrixUPServer_SelfExtractor.exe on the print server.

5. On each XenApp or XenDesktop host:

a. Run InstallServicePatchOnXAServer.bat on the XenApp 6.5 host or InstallServicePatchOnVDA.bat on the XenDesktop host.

b. Run CitrixUPClient_SelfExtractor.exe and follow the instructions. The spooler restarts automatically at the end of the client component installation, and the new Universal printer driver is installed.

c. Run InstallGroupPolicyPatchOnGPMC.bat on the computers where you use the Citrix Group Policy Management Console.

6. On the Windows Server 2008 32-bit print server:

a. Ensure all Windows updates are installed.

b. Double-click CitrixUPServer_SelfExtractor.exe and follow the instructions. The server component installs the following services:

Citrix XTE Server – Installed under the Network Service account and configured for automatic start (dependent on the Citrix Print Service).

Citrix Universal Print Service – Installed under the Local Service account and configured for automatic start. After starting, the Citrix Universal Print Service configures the Citrix XTE Server, which then starts.

To configure Universal Print Server policy settings

If you use the Local Policy Editor or Active Directory to configure the following Citrix policy settings, the policy settings apply to XenApp, XenDesktop, and the print server. If you configure these policy settings using the Citrix AppCenter, the policy settings apply only to XenApp and XenDesktop.

Universal Print Server enable – Enables or disables the Universal Print Server feature. This Citrix Computer policy setting applies to Organizational Units (OUs) containing the XenApp and XenDesktop hosts. Valid values are:

Enabled with fallback to Windows native remote printing

Network printer connections are serviced by the Universal Print Server, if possible. If the Universal Print Server is not available, the Windows Provider is used. The Windows Provider continues to handle all printers previously created with the Windows Provider.

Enabled with no fallback to Windows native remote printing

Network printer connections are serviced by the Universal Print Server exclusively. If the Universal Print Server is unavailable, the network printer connection fails. This setting effectively disables network printing through the Windows Print Provider. Printers previously created with the Windows print provider are not created while a policy containing this setting is active.

Disabled (default) – The Universal Print Server feature is disabled.

No attempt is made to connect with the Universal Print Server when connecting to a network printer with a UNC name. Connections to remote printers continue to use the Windows native remote printing facility.

Universal Print Server data stream (CGP) port

Specifies the TCP port number used by the Universal Print Server print data stream CGP (Common Gateway Protocol) listener. This Citrix Computer policy setting applies to OUs containing the print server. Valid values: 1-65535. Default: 7229

Universal Print Server Web service (HTTP/SOAP) port

Specifies the TCP port number used by the Universal Print Server listener for incoming HTTP/SOAP requests. This Citrix Computer policy setting must specify the same value for the OUs containing the network print server, plus the XenApp and XenDesktop hosts. Valid values: 0-65535. Default = 8080

Universal Print Server print stream input bandwidth limit (kbps).

Specifies the upper bound (in kilobits-per-second) for the transfer rate of print data delivered from each XenApp or XenDesktop print job to the Universal Print Server using the CGP protocol. This Citrix User policy setting applies to OUs containing the XenApp and XenDesktop hosts. Valid values: integers > 0. Default: 0 (unlimited)

Effects on User Interfaces

The new Citrix Universal printer driver used by the client component has the same characteristics and user interface as the Citrix Universal printer driver it replaces, with the following exceptions.

  • The Local Printer Settings button in the Printer Properties dialog box is disabled.
  • The Local Printer Settings and Preview on client buttons in the Document Properties dialog box are disabled.

When using the Universal Print Server, the Add Printer Wizard for the Citrix Print Provider is the same as the Add Printer Wizard for the Windows Print Provider, with the following exceptions:

  • When adding a printer by name or address, you can provide an HTTP/SOAP port number for the print server. That port number becomes a part of the printer name and appears in displays. See the Universal Print Server Web service (HTTP/SOAP) port policy setting description above.
  • If the Citrix Universal printer driver usage policy setting specifies that universal printing must be used, the Universal printer driver name appears when selecting a printer. The Windows Provider cannot use the Universal printer driver.

Source on Citrix Universal Print Server:

Download Citrix Universal Print Server here

Thomas Koetzing article on Citrix Universal Print Server

Citrix Official whitepaper on Citrix Universal Print Server