The host is Linux mint 10
The virtual box guest is windows 2K
I wanted windows 2K to be able to print to a network printer.
The instructions lower down the page, came from here:-http://ubuntuforums.org/showthread.php?t=1614284
and did not work for me, but did point me in the right direction.
The relevant part is to change the virtual machine default network settings from NAT to bridged.
The default NAT gives you an IP range of 10.0.2.2.
Once this is done, your virtualbox guest (windows 2K/XP) is then on the same network range as the linux host, in my case, 192.168.1.2, and can print directly to a network printer, without worrying about CUPS and linux printing.
Use add printer from the printer menu, and install a local printer, setting the port to LPT1.
There does not have to be a printer attached.
Make sure to install the drivers for the printer on the network that you want to use. In my case, a HP lazerjet.
Once the drivers and printer are installed, right click on the printer and select properties, then select the ports tab.
In this tab click on ‘add port’, and select ‘standard tcp/ip port.
The dialogue box will ask for the IP address of the printer, put it in without the http,
ie 192.168.1.225, using your own IP of course,
and it will be added as ip_192.168.1.225
OK out of the boxes saving as you go.
The instructions for enabling access to a Linux host’s printer
from a Windows VirtualBox client goes like this:
1. Install your printer driver. Get your printer working.
2. Add your printer to CUPS at http://localhost:631/admin
If CUPS is not installed in your computer, go to the official CUPS website to download it.
You may also want to read the Ubuntu Official Documentation here.
3. Set your virtual machine’s Network to Bridged Adapter (eth0) in Settings and connect the cable (Advanced menu).
4. Start your VirtualBox machine.
5. Enter “ifconfig” at a terminal prompt to list your current network settings
and copy down your host’s (eth0) address. You can also access this address using Network Tools.
1. Add a new Network printer in “Printers and Faxes” from the Control Panel
2. Enter the URL address of your host’s printer.
For example: http://192.168.0.2:631/printers/Your_printer’s_name
You need the :631 after your host’s address as this is the port
that CUPS listens to. Your_printer’s_name is the name of the printer you added to CUPS.
If no connection is made, check your firewall settings.
If you want a Linux VirtualBox client to access a Window’s host’s printer, you’re going the wrong direction!
Very useful, thanks a lot.
Let me just add one bit more of information: on the Linux side in System/Administration/Printing/Server/Setting be sure that the flag “Allow printing from the Internet” is set.