Virtual machine as a layer between the printer and the host machine

This is for discussing general topics about how to use VirtualBox.
Post Reply
GOTY
Posts: 2
Joined: 15. May 2023, 13:34

Virtual machine as a layer between the printer and the host machine

Post by GOTY »

Hello tail machine on windows 10 pro, windows XP is installed in the virtual machine, the virtual machine is used to use the old canon printer. Is it possible to set up the machine so that it would not be required to enter XP every time and print from there. This is important because there are a lot of programs on the host machine that don't work in XP and therefore I can't print documents that can't be opened in XP. Is it possible to use a virtual machine as a layer between the host and XP? So what if I pressed print on the host machine and the printed information was directly transmitted through the virtual machine to the printer?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine as a layer between the printer and the host machine

Post by scottgus1 »

GOTY wrote:Is it possible to set up the machine so that it would not be required to enter XP every time and print from there.
Unfortunately, no. XP has the drivers for the printer and is hosting the printer. XP has to be running to do this.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual machine as a layer between the printer and the host machine

Post by mpack »

Before a PC can use a printer, it needs drivers for that printer. It does not matter whether the printer is directly attached to the PC or is accessed over a network.

So no, if the PC you want to use (e.g. the host) doesn't have drivers for a printer, then it can't use that printer. Something else that does have drivers, e.g. your XP VM, needs to do the printing.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual machine as a layer between the printer and the host machine

Post by fth0 »

Well, there might be a solution that fits your needs (kudos for the detailed description, which helps to recognize the possible XY problem ;)):

On your Windows 10 host machine, let the programs print to PDF files and put them into a VirtualBox Shared Folder. Afterwards, you'll only need a Windows XP PDF software to print to your printer.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual machine as a layer between the printer and the host machine

Post by mpack »

fth0 wrote: On your Windows 10 host machine, let the programs print to PDF files and put them into a VirtualBox Shared Folder. Afterwards, you'll only need a Windows XP PDF software to print to your printer.
I assume that is what he is already doing, and finding cumbersome. Hence the wish to avoid copying a PDF into a shared folder, booting a VM, .... etc.
GOTY
Posts: 2
Joined: 15. May 2023, 13:34

Re: Virtual machine as a layer between the printer and the host machine

Post by GOTY »

fth0 wrote:Well, there might be a solution that fits your needs (kudos for the detailed description, which helps to recognize the possible XY problem ;)):

On your Windows 10 host machine, let the programs print to PDF files and put them into a VirtualBox Shared Folder. Afterwards, you'll only need a Windows XP PDF software to print to your printer.
It's a pity, I expected that on the host machine you can install something like a virtual printer driver, which will transfer print data to the virtual machine, and that in turn accepts them immediately as print data
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual machine as a layer between the printer and the host machine

Post by mpack »

I'm afraid that controlling physical hardware simply isn't a priority for a virtual machine. The point is to create a virtual PC and then you can run standard PC software on it.

Does that virtual printer driver - with a translation layer so that it present a common interface on machine A regardless of whatever printer is attached to machine B - exist anywhere else to your knowledge? E.g. working over a network?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual machine as a layer between the printer and the host machine

Post by scottgus1 »

GOTY wrote:install something like a virtual printer driver, which will transfer print data to the virtual machine, and that in turn accepts them immediately as print data
That would be really cool. But it isn't one of Virtualbox's functions.

Virtualbox gives you an empty "PC" to do things a PC can do. So dropping PDFs to a shared folder and having a script on the printer-driving PC auto-print the PDFs is something a Virtualbox VM (or a real stand-alone old PC or laptop hint hint :D ) can do.

But doubling as a printer driver so the host can print directly is not something Virtualbox can do.
Post Reply