VMware Workstation supports two types of virtual parallel port devices: unidirectional ports (SPP) and a partial emulation of bidirectional PS/2-style ports.
Bidirectional ports are supported on all Windows hosts.
Unidirectional ports are supported in all Linux versions. Bidirectional ports are supported in Linux kernel versions 2.2.5 or later.
On Linux hosts, VMware Workstation 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 Workstation 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.
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, etc.
Bidirectional ports are used by a variety of devices - printers, scanners, dongles and disk drives, for example.
Currently, VMware Workstation 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. Below is a partial list of devices known to work. 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).
When parallel ports are set up on a Windows host, they are bidirectional by default. 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.
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 the virtual machine is configured with a parallel port, most guest operating systems automatically detect it at installation time and install the required drivers. Some operating systems, including Linux, Windows NT and Windows 2000, automatically detect the port(s) at boot time. Others, like Windows 9x, do not.
To add a parallel port to the virtual machine's configuration, take these steps with the virtual machine powered off.
Edit > Virtual Machine Settings
Click Finish.
Edit > Virtual Machine Settings
The path names of the host devices for bidirectional parallel ports are usually
/dev/parport0, /dev/portport16, /dev/parport32, etc. The VMware Workstation installer creates these devices if they do not exist. They may also be created by hand using mknod. For example, to create the second parallel port (parport16) use this command:
mknod /dev/parport16 c 99 16
In a Windows 9x guest, when you change a port from unidirectional to bidirectional or vice versa, you must use the Device Manager (Start > Settings > Control Panel > System > Device Manager) to remove the device driver for that port and add a new one. Adding a new driver is also required when a new port is added. In both cases use the guest operating system's Add New Hardware Wizard (Start > Settings > Control Panel > Add New Hardware) and let Windows detect the new device. Manually selecting the device from a list may result in an incorrect configuration.
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 Virtual Machine Control Panel (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.
For 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.
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 Workstation 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
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 Workstation puts a lock on the device, and this lock restricts access so only the virtual machine can use the port.
You can choose Edit > Removable Devices to disconnect the parallel port from the virtual machine and reconnect it.
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 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 Workstation 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.
On Windows 9x, use of older drivers for the Iomega Zip drive may cause the guest operating system to lock up intermittently at boot time or during installation of the guest operating system. The newest Iomega drivers work reliably in our tests. They are available at www.iomega.com/software/index.html.
© 1998-2003 VMware, Inc. All rights reserved.