OK everyone: I have a Windows XP Virtualbox machine, running inside of Ubuntu 16.04. I have a network printer successfully working with the Ubuntu host that I'd like to connect to the Virtualbox machine, but I'm having a heck of a time doing it.
I REALLY want to add the printer using "Host Only" mode for the virtual machine, rather than "Bridged"...I don't want the virtual machine to have network access right now. So, having researched things on Google,
- I made certain that the printer was "shared" in Ubuntu and the "print from internet" option was enabled.
- I found that you have to add a Host networking adapter in Virtualbox, which I set up and connected the virtual machine to
Even after this, however, I cannot get the Windows XP guest machine to "see" the printer when going through the "add printer" dialog (I used the "network printer" option, as several instructions advised me to do.
In desperation, I went ahead and tried to do it using "Bridged" mode...but that doesn't work either. Another set of instructions advised that I should make certain the printer was added in CUPS...edit Initially, I couldn't access CUPS, but I found the fix for that. It looks like the printer is already available there, with the right settings checked (shared, available over the Internet)...but I still can't "see" it from Virtual Box.
I've honestly tried to research this, and I'm sure I'm leaving something out that I tried (I'll add it if I think of it again), but honestly, I'm about to throw my hands up! What the heck am I missing?
Thanks in advance!
EDIT/UPDATE Someone asked about the printer being connected to the Ubuntu/host machine via USB, so I thought I'd clarify: it's a wireless/network printer. However, my understanding is that if the printer can be reached via the host and is "shared" in linux, that shouldn't matter.
After some time, I was finally able to get printing working in the virtual machine...using NAT mode. An unfortunate side effect of this, however, is that now the virtual machine has access to the Internet, and that's what I was trying to prevent by using Host-Only mode. I'm still not understanding why Host-Only isn't working. I'm going to try and determine the virtual machine's IP (I'm not sure, but I'm guessing it has a subnet address): my plan is to see if I can firewall it somehow while preserving printer access...but it's not a perfect solution.