Whether you use client-mapped printers or server printers, you'll need to have printer drivers installed on each of your MetaFrame XP servers. Consequently, you will need to spend some time thinking about how to manage those printer drivers. Before we address this issue, however, let's look at what printer drivers really are, how they work, and how they're stored on Windows servers.
How Windows Printer Drivers Work
Fundamentally, Windows printer drivers translate print jobs from an enhanced metafile format, which is printer-independent, into the native language that can be understood by a printer. This is the reason why a printer prints garbage when you use the wrong driver. Printer drivers need to be installed and registered on a computer before they can be used.
Two things happen when you install a printer driver onto a Terminal Server or Windows 2000 server. First, the necessary printer driver files are copied from the source location to the server. The server stores printer driver files in the %systemroot%\system32\spool\drivers\w32x86\3\ folder. In this path, the w32x86 signifies an Intel Windows NT or Windows 2000 platform, and the "3" signifies the version of the printer driver (3 = Windows 2000, 2 = Windows NT 4.0).
Second, the driver's details are written to the registry in this path: HKLM\System\CurrentControlSet\Control\Print\Environments\ Windows NT x86\Drivers\Version-3\printerdrivername. Similar to the file path, a Version-3 key means that the driver is a Windows 2000 driver and a Version-2 key means that the driver is a Windows NT 4.0 driver.
User's individual printer settings, such as print, duplexing, and paper tray options, are stored in the HKCU\Printers registry key. These settings are user-specific, just like any other customized Windows settings.
Installing Printer Drivers
Installing print drivers onto a MetaFrame XP server is no different than installing print drivers onto any Windows computer. While it would be nice if you could point a wizard to an .inf file in the CMC, the easiest way is to use the standard Windows "Add Printer" wizard. Have the wizard copy the drivers from your source location to the server. Select a local port that is not in use for the printer, keeping in mind that there is no limit to the amount of printers you can add to one port. As soon as you install the printer, you may delete it. The print drivers will remain installed on the server. You may verify that the drivers are installed through the CMC (CMC | Printers | Drivers).
If you're running MetaFrame XP on Terminal Server 4.0, then you need to ensure that any print drivers you install are compatible with the Terminal Serer Edition of Windows NT 4.0, instead of just Windows NT 4.0. This is not an issue in Windows 2000 environments, because by definition, all Windows 2000 printer drivers must work in regular and Terminal Services modes.
Removing Printer Drivers
When you delete a printer from the "Printers" folder on one of your MetaFrame XP servers, the drivers are not uninstalled from the server. This can be a problem, because if you've identified that a certain printer driver causes problems, you need to be able to remove that driver from the server to prevent clients from using it. Also, if a driver is no longer needed, removing it will mean that there is less for the IMA data store to manage.
Fortunately, you can manually remove a printer driver and all traces of its existence by following this simple procedure:
- If you haven't done so already, remove the printer by deleting it form the "Printers" folder.
- Stop the spooler service.
- Browse to the following registry location: HKLM\System\ CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-x\printerdrivername, where x is the version of the driver (2 = NT 4.0, 3 = Windows 2000).
- Note the names of the files listed.
- Remove the registry key yourprinterdriver.
- Delete the referenced driver files from the %systemroot%\ system32\spool\drivers\w32x86\x folder. If you have multiple printers installed, you may want to copy the driver files to a temporary location before you delete them outright, because many similar types of printers use the same driver files.
- If you're not able to delete the files, you will need to disable the spooler, reboot, and delete the files again. After you do this, remember to reset the spooler to "automatic" startup.
- After the print drivers have been removed, you should reboot the server.
What driver does a Printer Use?
Occasionally, you will need to figure out which drivers a printer uses that you haven't installed yet. This is especially handy if you allow your MetaFrame XP server to automatically install any needed printer drivers.
Every Windows NT and Windows 2000 server has a "master list" of default printers that it supports and the drivers that each printer needs. That master list is stored in the %systemroot%\inf\ntprint.inf file. You can open this file in a text editor to see which drivers each printer will request. Ntprint.inf is organized by manufacturer, with individual printers and their drivers listed under the manufacturer's section, as shown below.
"HP 2000C" = HPV2000C.GPD.ICM
How MetaFrame XP Manages Printer Drivers
The IMA data store maintains records of the configured printers and installed print drivers on every MetaFrame XP server in the server farm. The data store obtains this information via the following methods:
- During MetaFrame XP installation, the IMA Data Store records a list of printer drivers that have been previously installed on the server.
- Whenever a print driver is installed on a MetaFrame XP server, that server's IMA service updates the printer driver list in the IMA data store. If the IMA service is not running when a printer driver is installed, it synchronizes its local information with the data store the next time it starts. During synchronization, all appropriate drivers are added to the data store for any new printer drivers found on the MetaFrame XP server. Additionally, any printer driver entries that exist in the data store for print drivers that no longer exist on farm servers are removed from the data store.
If you ever feel that the printer drivers in the data store are not in sync with the printer drivers on a server, you can manually update the driver list in the IMA data store (CMC | Printer Management | Update Printer and Driver Information).
Replicating Printer Drivers Between MetaFrame XP Servers
The reason that printer driver information is stored in the IMA data store is so that printer drivers can be replicated between MetaFrame XP servers in the farm. MetaFrame XP offers a few different methods for replicating printer drivers. This is useful because printer drivers need to be installed on MetaFrame XP servers regardless of which printing method (client printer mapping or server printers) that you choose. You can choose from four different methods for replicating printer drivers between MetaFrame XP servers. The first two are features of MetaFrame XP, and the last two are not:
- MetaFrame XP replication.
- Automatic MetaFrame XP replication.
- Manual Resource Kit replication.
- Manual replication.
Method 1. MetaFrame XP Printer Driver Replication
MetaFrame XP printer driver replication is designed to copy printer driver files and registry settings to MetaFrame XP servers across the server farm, allowing you to install all required printer drivers on one MetaFrame XP server and then replicate the files and registry settings to all other servers in the farm. MetaFrame XP printer driver replication does not replicate printer properties such as default paper tray selection or paper orientation.
Using MetaFrame XP's print driver replication feature, you can manage all MetaFrame XP printers across the entire server farm via the Citrix Management Console (CMC | Printers | Right-click Print Driver | Replicate Drivers). Make sure that when you replicate drivers, you are not in the <any> server view by choosing a specific server name from the dropdown list or by selecting the server from the left pane. If you try to replicate drivers in the <any> view, MetaFrame XP will randomly choose the server that is to be used as the master to be replicated. This is not a good thing.
Choosing to replicate a driver will lead to a dialog box in which you can indicate whether to replicate the driver to all MetaFrame XP servers in the farm or to just the servers that you specify. Additionally, you can check a box that forces the source driver to overwrite the target driver, which is helpful when updating driver versions. Keep in mind that Windows 2000 and Windows NT use different printer drivers. Do not replicate between the two platforms.
When you're setting up printer driver replication, do not choose destination servers that are not operating and will not be within 24 hours. After 24 hours, the replication queue marks the job as incomplete. Even if the server comes back online, drivers will not be replicated.
If driver replication fails due to communication errors, the console displays an error message and records the error in the server Event Log for each server where the operation failed.
Advantages of MetaFrame XP Replication
- Prevents you from having to install the same printer driver on multiple servers.
- Replicates printer drivers even if no printers are installed.
- Once the replication process begins, no user intervention is required.
Disadvantages of MetaFrame XP Replication
- You must manually invoke the replication process.
- Source and target server platforms must be the same.
- Replicating too many drivers can degrade performance.
- Target servers that are not available for more than 24 hours will not receive new drivers.
- If bad drivers are replicated, all MetaFrame XP servers can be broken very quickly.
- Printer settings are not replicated.
Method 2. MetaFrame XP Automatic Replication
A disadvantage to the MetaFrame XP printer driver migration is that you must manually invoke the replication process. If there are many print drivers that frequently change in your environment, you can configure your server farm for automatic printer driver replication. This automatic replication will occur whenever servers are added to the farm or whenever the IMA service is started. The IMA data store maintains two lists of drivers to be replicated, one for Terminal Server 4.0 servers and one for Windows 2000 servers.
You can add or remove drivers from the auto-replication lists with the CMC (CMC | Printers | Drivers Tab | Auto Replication). When auto replication is enabled for a driver, an entry is added to the appropriate data store list. When you edit the auto replication list, you can specify one server to use as the master source server or you can let MetaFrame XP pick any server where the driver is installed. If you specify <any> as your source server, MetaFrame XP will copy the driver from any server that is available in the farm at the time of auto replication to a new or restarted server. This will enable the replication to take place without a dependency on one specific server.
It's easiest to track printer driver versions within the server farm if you choose one server as your master printer driver server. This is not a technical requirement, but rather a practical decision. Additionally, if you have both Windows NT and Windows 2000 servers, you should select one printer driver master server for each operating system. Choosing one master printer driver server will make it easier to manage the automatic replication of printer drivers.
Unfortunately, when you configure auto replication, your source server must be a MetaFrame XP server. You cannot choose to replicate printer drivers from network print servers or other network sources. Citrix claims that this is because MetaFrame XP does not have guaranteed access to those servers or sources. Critics claim that this is because Citrix didn't spend the time to implement this feature. Either way, you'll need to install the drivers on at least one MetaFrame XP server before you can use MetaFrame XP's replication features to copy the drivers to the remaining servers.
Advantages of MetaFrame XP Manual Replication
- "Hands off" print driver replication and management.
- Printer drivers can be configured for replication on a driver-by-driver basis.
- Can be configured with multiple source servers, preventing an unwanted single point of failure.
Disadvantages of MetaFrame XP Manual Replication
- IMA service start times greatly increase.
- Driver replication can take a long time, especially with many drivers.
- Increased network traffic.
- Increased CPU load.
- Sometimes it doesn't work (for no apparent reason).
- The auto replication engine continuously checks for driver changes.
- Printer settings are not replicated.
If you choose to use auto replication for your print drivers, be careful. It should only be used in situations where you need to replicate a few drivers. In reality, the print drivers on your servers will probably not need to be changed that often, so you should be able to use manual replication when driver updates are needed.
Auto printer driver replication is known for being CPU-intensive. Make sure to monitor the CPU utilization of the source server when it is used, especially if you reboot more than one MetaFrame XP server at the same time.
Method 3. Using Print Migrator 2000 to Replicate Drivers
The Windows 2000 Server Resource Kit Supplement 1 includes Printer Migrator 2000, a utility that can be used to replicate printer drivers between servers. This utility can be used with Windows NT 4.0 and Windows 2000 servers. For pure Terminal Server 4.0 environments, you can also use Printer Migrator 1.0, included in the Windows NT 4.0 Server Resource Kit.
Printer Migrator 2000 allows you to back up printers, print queues, ports, printer drivers, and printer shares to a .cab file. You can then restore the settings of that .cab file to another server. This utility can only restore Terminal Server 4.0 backups to Terminal Server 4.0 servers and Windows 2000 backups to Windows 2000 servers.
Advantages of Print Migrator 2000 Replication
- No overhead when it's not being used.
- Drivers and settings can be replicated to remote servers.
- Drivers can be replicated from network print servers to MetaFrame XP servers.
Disadvantages of Print Migrator 2000 Replication
- Must be manually invoked.
- The spooler service is stopped while this tool is used.
Method 4. Manual Print Driver Replication
The last option that you have for replicating printer drivers is to do it manually. You must manually install or copy all of the needed printer drivers onto each of your MetaFrame XP servers.
Advantages of Manual Print Driver Replication
- No performance overhead of any replication services.
- No learning curve.
- Allows you to install different printer drivers to different servers.
- Works well in small environments with only a few drivers.
Disadvantages of Manual Print Driver Replication
- Drivers must be manually installed onto each MetaFrame XP server.
Printer Driver Replication Performance
When the IMA service starts, it must synchronize all installed printers and drivers with the IMA data store. This causes each MetaFrame XP server to read the new printers and drivers from the data store. Any time printers or printer drivers are installed or deleted, this information is updated in the IMA data store. The data store contains one record for each print driver, one for each server, and a complete list of the printer drivers installed on each server. The more print drivers installed on farm servers, the larger the printer records in the IMA data store become and the longer it takes the service to start. Something as "insignificant" as printer driver auto-replication can affect overall performance in three ways:
- MetaFrame XP server performance.
- Amount of IMA traffic.
- IMA service startup time.
Many factors, including network traffic and server load, affect how quickly printer drivers replicate. The IMA service handles MetaFrame XP printer driver replication and it contains information for printer drivers, auto-replication, and replication source and destination servers. The replication itself is performed by the IMA service's "printer driver replication queue." This replication queue operates at a low priority, allowing other critical services to access the bandwidth they need. Each printer driver/server combination creates an item in the printer replication queue. In your environment, you should take steps to ensure that this queue does not exceed 1,500 entries. To determine the queue size, multiply the number of installed drivers by the number of MetaFrame servers. (10 drivers to 5 servers = 50 items, 5 drivers to 100 servers = 500 items)
In lightly used environments, this replication queue might be able to handle 50 entries per minute. In more heavily utilized environments, it might fall to 10 per minute. Remember that printer driver replication can be very CPU intensive on the source server, so you should avoid replicating drivers while the source server has a heavy load. You can monitor the replication queue items with the qprinter command. You can also find replication history and status messages from each target server's application event log.
If you decide to use printer driver replication or auto-replication, you should follow these best practices:
- Install as few printer drivers on MetaFrame XP servers as possible. This includes limiting the number of drivers, as well as not installing drivers on servers where they will never be used.
- Install "common" drivers where possible. For example, many HP laser printers can use the same basic driver.
- Remove unused drivers.
- Separate the server farm into multiple zones.
Following these basic steps will allow you to use MetaFrame XP printer driver replication without severely impacting the performance of your MetaFrame XP environment.