VMware

VMware Workstation 4.5

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Using Parallel Ports

Using Parallel Ports

The following sections describe how to use parallel ports with VMware Workstation:

VMware Workstation supports a partial emulation of bidirectional PS/2-style ports.

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 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.

Parallel Ports

Parallel Ports

Parallel ports are used by a variety of devices, including printers, scanners, dongles and disk drives.

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.

Installation in Guest Operating Systems

Installation in Guest Operating Systems

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 ports at boot time. Others, like Windows 95 and Windows 98, do not.

To add a parallel port to the virtual machine's configuration, take these steps with the virtual machine powered off.

  1. Open the virtual machine settings editor.

    VM > Settings

  2. Click Add to start the New Hardware Wizard.
  3. Select Parallel Port, then click Next.
  4. Make the appropriate selection to use a physical parallel port or connect the virtual parallel port to a file.
  5. If you selected Use physical port, choose the port from the drop-down list.

    If you selected Use output file, enter the path and filename or browse to the location of the file.

    Under Device status, the default setting is Connect at power on. Clear the check box if you want to deselect this setting.

    Click Finish.

In a Windows 95 or Windows 98 guest, after you add the port, run the guest operating system's Add New Hardware Wizard (Start > Settings > Control Panel > Add New Hardware) and let Windows detect the new device.

Configuring a Parallel Port on a Linux Host

Configuring a Parallel Port on a Linux Host

For the 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 the required modules.

Parallel Ports and Linux 2.2.x Kernels

Parallel Ports and Linux 2.2.x Kernels

The 2.2.x kernels that support parallel ports use the parport, parport_pc and vmppuser modules. Be sure that PC Style Hardware (CONFIG_PARPORT_PC) is loaded as a module, as mentioned at the beginning of 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 command inserts the three modules needed for a 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

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 hash character (#) 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 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

Parallel Ports and Linux 2.4.x Kernels

Parallel Ports and Linux 2.4.x Kernels

Be sure that PC Style Hardware (CONFIG_PARPORT_PC) is loaded as a module as mentioned at the beginning of Using Parallel Ports. If you are using a 2.4.x kernel, the modules that provide 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 command inserts the three modules needed for a 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

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 hash character (#) 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 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 VM > Removable Devices to disconnect the parallel port from the virtual machine and reconnect it.

Device Permissions

Device Permissions

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.

Special Notes for the Iomega Zip Drive

Special Notes for the Iomega Zip Drive

On Windows 95 or Windows 98, 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.

previous Prev   Contents   Last   Next next