VMware GSX Server supports two types of virtual parallel port devices: unidirectional ports (SPP) and a partial emulation of bidirectional PS/2-style ports.
Unidirectional ports are supported in all Linux versions. Bidirectional ports are supported in Linux kernel versions 2.2.5 or later.
VMware GSX Server requires that the parallel port "PC-style hardware" option (CONFIG_PARPORT_PC) be built and loaded as a kernel module (that is, it must be set to “m”). VMware GSX Server is unable to use bidirectional parallel port devices if CONFIG_PARPORT_PC is built directly (compiled) into the kernel. This limitation exists because CONFIG_PARPORT_PC does not correctly export its symbols.
The virtual parallel ports can be configured in two ways.
Unidirectional ports are supported for backward compatibility. They are used typically to connect to printers or to send the printer output to a file. The speed is usually adequate for printing text, but expect long delays when printing images.
On a Linux host, the path names of the host devices for unidirectional ports are typically /dev/lp0, /dev/lp1 and so on.
Bidirectional ports are used by a variety of devices — printers, scanners, dongles and disk drives, for example.
Currently, VMware GSX Server provides only partial emulation of PS/2 hardware. Specifically, interrupts requested by a device connected to the physical port are not passed to the virtual machine. Also, the guest operating system cannot use DMA (direct memory access) to move data to or from the port.
For this reason, not all devices that attach to the parallel port are guaranteed to work correctly. A partial list of devices known to work is included below. If you try out a device that is not on the list, please let VMware know.
Bidirectional emulation is slower than native access but faster than unidirectional emulation, so bidirectional mode is recommended, when possible, even when the device connected to the port is unidirectional (a printer, for example).
Note: You cannot start a virtual machine with a bidirectional parallel port connected, even if the device is set to start connected in the Configuration Editor.
When parallel ports are set up on a Linux host, they are bidirectional by default on Linux hosts with kernel 2.2 or higher. Otherwise, they are unidirectional. Their default base addresses are in order, 0x3bc, 0x378 and 0x278. None of the ports have an assigned IRQ or DMA channel. The ports are not present by default.
If an error message appears at power on stating the parallel port on the host does not have an ECR (extended control register), it is possible the hardware supports it but it has been disabled in the BIOS. In this case, reboot your host computer, enter the BIOS configuration editor (typically by holding down the Delete key during early execution of the BIOS), find the parallel port field, and enable ECP mode (or other combination of modes that include ECP). Most modern computers should support ECP mode.
Configuring a Bidirectional Parallel Port on a Linux HostFor the bidirectional parallel port to work properly in a guest, it must first be configured properly on the host. Most issues involving parallel port functionality are a result of the host configuration. Check these areas of concern: the version of your Linux kernel, your device access permissions and required modules.
Be sure that PC Style Hardware (CONFIG_PARPORT_PC) is loaded as a module as mentioned at the beginning of this section on using parallel ports. If you are using a 2.4.x kernel, the modules that provide bidirectional parallel port functionality are parport, parport_pc and ppdev.
To see if these modules are installed and running on your system, run the lsmod command as the root user. These three modules should be included in the listing of running modules. You can also look at the /proc/modules file for the same list.
To load the proper modules, run this command:
insmod –k <modulename>
If none of the listed parallel port modules is running, use this command:
insmod –k parport_pc
This inserts the three modules needed for a bidirectional parallel port.
If you continue to see problems, it is possible that the lp module
is running. If it is, the virtual machine cannot use the parallel port correctly.
To remove the lp module, run this command as the root user:
rmmod lp
The lp module is necessary only for unidirectional parallel ports.
You should also ensure that the line referring to the lp module in the /etc/modules.conf or /etc/conf.modules file is removed or commented out by inserting a # at the beginning of the line. The name of the configuration file depends on the Linux distribution you are using. When you reboot the host after removing this line, the configuration file no longer starts the lp module.
To ensure that the proper modules for the bidirectional parallel port are
loaded at boot time, add this line to the /etc/modules.conf or
/etc/conf.modules file:
alias parport_lowlevel parport_pc
Linux kernels in the 2.4.x series also use a special arbitrator that allows access to the parallel port hardware. If the parallel port is in use by the host, the guest cannot use it. If a virtual machine is using the parallel port, the host and any users accessing the host are not given access to the device. VMware GSX Server puts a lock on the device, and this lock restricts access so only the virtual machine can use the port.
You can use the Devices menu to disconnect the parallel port from the virtual machine and reconnect it.
The 2.2.x kernels that support bidirectional parallel ports use the parport, parport_pc and vmppuser modules. Also, be sure that PC Style Hardware (CONFIG_PARPORT_PC) is loaded as a module, as mentioned at the beginning of this section on using parallel ports. The vmppuser module is supplied by VMware GSX Server to give virtual machines user-level access to the parallel port.
To see if these modules are installed and running on your system, run the lsmod command as the root user. These three modules should be included in the listing of running modules. You can also look at the /proc/modules file for the same list.
To load the proper modules, run this command:
insmod –k <modulename>
If none of the listed parallel port modules is running, use this command:
insmod –k parport_pc
This inserts the three modules needed for a bidirectional parallel port.
If you continue to see problems, it is possible that the lp module
is running. If it is, the virtual machine cannot use the parallel port correctly.
To remove the lp module, run this command as the root user:
rmmod lp
The lp module is necessary only for unidirectional parallel ports.
You should also ensure that the line referring to the lp module in the /etc/modules.conf or /etc/conf.modules file is removed or commented out by inserting a # at the beginning of the line. The name of the configuration file depends on the Linux distribution you are using. When you reboot the host after removing this line, the configuration file no longer starts the lp module.
To ensure that the proper modules for the bidirectional parallel port are
loaded at boot time, add this line to the /etc/modules.conf or
/etc/conf.modules file:
alias parport_lowlevel parport_pc
Some Linux distributions by default do not grant the virtual machine access
to the lp and parport devices. In most of these cases, the owner of the
device is root and the associated group is lp. To allow the VMware GSX Server
user to access the device, add the user to the associated group. To view the
owner and group of the device, run this command:
ls –la /dev/parport0
The third and fourth columns of the output show the owner and group, respectively.
To add the user to the device group, edit the /etc/group file. On
the line starting with lp, which defines the lp group, add the
VMware GSX Server user’s user name. You must make this change as the root user. The
following line provides an example for a user whose user name is userj.
lp::7:daemon,lp,userj
The next time the user logs on to the host, the changes take effect.
Device known to work |
Platforms on which they work |
Adobe® dongle |
Windows 95 guest |
Rio® MP3 player |
Windows 95 guest |
UMAX® Astra 1220 P scanner |
Windows 95 guest |
Hewlett-Packard LaserJet 5MP printer |
Windows 9x and Windows NT/2000 guests |
Canon Bubble Jet BJ-200e printer |
Windows 9x and Windows NT/2000 guests |
Iomega® ZIP drive |
Linux, Windows NT and Windows 2000 guests only |
Devices that may work include:
VMware GSX Server requires the parallel port PC-style hardware option (CONFIG_PARPORT_PC) be built and loaded as a kernel module (that is, it must be set to m). VMware GSX Server is unable to use bi-directional parallel port devices if CONFIG_PARPORT_PC is built directly (compiled) into the kernel. This limitation exists because CONFIG_PARPORT_PC does not correctly export its symbols.
© 2001-2002 VMware, Inc. All rights reserved.