Previous page

Next page

Locate page in Contents

Print this page

Setting Up a Network Printer

You can install a network printer directly into a guest operating system.

Before installing a network printer in a guest operating system, make sure that:

  • Your Mac can access the Internet.
  • The virtual machine is configured to work in either the Shared networking mode or Bridged networking mode and can access the Internet too.
  • The user account in the guest OS from which you are going to set up the printer has permission to access the network printer.
  • You know the printer IP address.

After that, you can log in to your guest OS and install a network printer.

In a Windows Guest Operating System

Before adding a network printer in Windows, download and install an appropriate printer driver. For detailed information on installing the printer driver, refer to the printer manufacturer documentation.

To add a network printer in a Windows 7 or Windows Vista guest operating system:

  1. Open the Windows Start menu and select Control Panel.
  2. In the Control Panel window, select Hardware and Sound and click Add a printer in the Devices and Printers section (Printers in Windows Vista). The Add Printer wizard opens.
  3. In the first window, click Add a network, wireless or Bluetooth printer.
  4. In the next window, click The printer that I want isn't listed.
  5. In the Find a printer by name or TCP/IP address window, select Add a printer using a TCP/IP address or hostname and click Next.
  6. In the Type a printer hostname or IP address window, do the following:
    1. Select TCP/IP Device from the Device type menu.
    2. Specify the printer IP address in the Hostname or IP address field.
    3. Clear the Query the printer and automatically select the driver to use option if it is selected.
    4. When ready, click Next.
  7. If prompted to specify additional port information, choose Standard, select Generic Network Card from the list, and click Next.
  8. In the Install Printer Software window, specify the manufacturer and model of the network printer.

    If the required printer model is not listed, click Have Disk button and specify the path to the .inf file located in the folder where you installed the printer driver.

    When ready, click Next.

  9. Continue with the printer configuration procedure. When the printer is added to the guest operating system, you can use it to print documents from your Windows XP virtual machine.

To add a network printer in a Windows XP guest operating system:

  1. Open the Windows Start menu and select Control Panel.
  2. In the Control Panel window, double-click the Printers and Faxes item.
  3. Click the Add a printer link to open the Add Printer wizard.
  4. In the Welcome to the Add Printer Wizard window, click Next.
  5. In the Local or Network Printer window, select Local printer attached to this computer and clear the Automatically detect and install my Plug and Play printer option if it is also selected. When ready, click Next.
  6. In the Select a Printer Port window, select Create a new port and specify Standard TCP/IP Port as the port type. When ready, click Next.
  7. In the Welcome to the Add Standard TCP/IP Printer Port Wizard window, click Next.
  8. In the Add Port window, specify the network printer IP address and click Next.
  9. If prompted to specify additional port information, choose Standard, select Generic Network Card from the list, and click Next.
  10. In the Completing the Add Standard TCP/IP Printer Port Wizard window, click Finish.
  11. In the Install Printer Software window, specify the manufacturer and model of the network printer.

    If the required printer model is not listed, click Have Disk button and specify the path to the .inf file located in the folder where you installed the printer driver.

    When ready, click Next.

  12. Continue with the printer configuration procedure. When the printer is added to the guest operating system, you can use it to print documents from your Windows XP virtual machine.

In a Linux or FreeBSD Guest Operating System

The procedure of setting up a network printer in a Linux or FreeBSD guest operating system depends on the Linux or FreeBSD distribution and printer. In this example, we describe how to set up a network printer in a virtual machine running RHEL 5.4 Server. However, you can use these guidelines as general instructions on how to set up a network printer in a Linux or FreeBSD virtual machine.

Note: For more detailed information, refer to the CUPS documentation.

To set up a network printer:

  1. Start the virtual machine.
  2. Make sure the following components are installed in the guest operating system:
    • Common UNIX Printing System (CUPS). Installation instructions can be found at CUPS site;
    • Samba service. Installation instructions can be found at Samba site; and
    • A Web browser, since we consider controlling CUPS via web interface.

      Note: To set up a network printer, you should have root privileges.

  3. Download and install an appropriate printer driver. For detailed information on installing the printer driver, refer to the printer manufacturer's documentation.
  4. Start Common UNIX Printing System. In the Terminal, type the command:

    /etc/init.d/cups start

  5. Start a web browser and type either the IP address of your virtual machine or http://127.0.0.1:631.
  6. Click the Add Printer button.
  7. In the Add New Printer window, specify a printer name. Under this name the printer will be displayed in the guest operating system. You can also enter the printer description and location. When ready, click Forward.
  8. In the Device for <Printer Name> window, select AppSocket/HP JetDirect and click Continue.
  9. In the Device URI for <Printer Name> window, specify the printer IP address in the following format:

    socket://<printer IP address>

    When ready, click Continue.

  10. In the Make/Manufacturer for <Printer Name> window, select the manufacturer of your printer and click Continue.
  11. In the Model/Driver for <Printer Name> window, select the model of your printer and click Add Printer.
  12. Enter the root password when prompted.

CUPS performs the installation. If the installation is successful, the "Printer <name> has been configured successfully" message is displayed. Now you can use this printer to print documents from the virtual machine.

Related Topics

Shared Networking

Bridged Ethernet Networking