Setting Up a Network Printer

126 users found this article helpful

How do I share a printer, that is set up on the Mac side, to my virtual machine over network?

Information

In order to share a Host printer over network, you need to first set up sharing on macOS side and then simply connect to the printer from the virtual machine side. To do that, please perform the following steps:

1. In Mac OS, open System Preferences Sharing > Services and enable the Printer Sharing service.

  1. Go to System Preferences - Print & Fax - Sharing and make sure that your printer is chosen in the "Share these printers with other computers" list.
  2. Make sure that your printer is able to print from the Mac side (print some test page).
  3. Virtual machine configuration includes a network adapter. Bridged Ethernet (Default Adapter) option should be selected. Make sure that the Enabled and the Connect at startup options are checked.
  4. User account from which you will setup the printer has permission to access the network printer.

In a Linux or FreeBSD Guest Operating System:
Make sure that the following components are installed in your guest Linux or FreeBSD system:
1. Common UNIX Printing System (CUPS). Installation instructions can be found at CUPS site cups.org/documentation.php;
2. Samba service. Installation instructions can be found at Samba site us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/install.html
3. A Web browser, since we consider controlling CUPS via web interface;
4. Also you have to know the root password.

Windows virtual machines

  1. To add a network printer in a Windows guest OS:

    • Start the Windows guest operating system and log in the proper account.
    • Open Windows Start menu, select Settings and then the Printers and Faxes (or simply Printers) item.
    • Open the Add Printer Wizard
  2. In the Add Printer Wizard:

    • Click Next in the wizard's first screen, in the Local or Network Printer screen
    • Click Local Printer, on next step create a new 'Standard TCP/IP' port
    • Type in first field correct IP of your printer.
  3. Continue an ordinary network printer installation.

Linux virtual machines

  1. Start your Linux or FreeBSD guest operating system.
  2. Start Common UNIX Printing System. In the Terminal, issue the command:

    sudo systemctl start cups
    
  3. Start a Web browser and open either the IP address of your virtual machine or

    http://127.0.0.1:631
    
  4. Select Printers in menu. Click the Add printer button below the list of available printers (if any).
  5. You are asked for the root password. Enter it to be able to proceed.
  6. In the Add New Printer screen, enter the information for easy identification of the printer: an informative printer name, location, and description.
  7. In the Device for screen window, select the Windows Printer via Samba.
  8. In the Device URI for screen window, specify the path to the network printer in the following format:

    smb://
    
  9. In the Model/Driver for screen window, select the model of your printer.
  10. CUPS performs installation. If installation is successful, the "Printer has been added successfully" message is displayed.

Was this article helpful?

Tell us how we can improve it.