[SOLVED] Using printers from guest OS

Discussions related to using VirtualBox on Linux hosts.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

[SOLVED] Using printers from guest OS

Post by Overwrought »

I am a very inexperienced VBox user. We have two desktop machines running Linux Mint 16 as the host OS and Windows XP Pro as the guest. One PC has a Brother HL-1250 laser printer and the other a Canon ip 6700D inkjet photo printer, both connected by USB. Both printers work up to a point in the host OS, the Brother fairly normally but the Canon disastrously, which I have put down to an inadequate driver (could be an inadequate user, though :? ). Neither printer will work from the guest OS. The guest OS appears to send information to the printers but the connection just isn't there. I am particularly keen to print on the Canon from XP, as I know that the standard Canon drivers work well on that.

Having read a little of the VBox Manual, I tried the following terminal commands, with similar results. This is the output from one machine:

john@john-EP35-DS3R ~ $ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 04f9:0007 Brother Industries, Ltd HL-1250 Laser Printer
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
john@john-EP35-DS3R ~ $ VBoxManage list usbhost
Host USB Devices:

<none>

Any ideas please as to what I am missing?
Last edited by Overwrought on 16. Jul 2014, 17:39, edited 1 time in total.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Using printers from guest OS

Post by loukingjr »

Make sure the extension pack for VirtualBox is installed and make sure you add your user name to the vboxusers group in your host. I believe you have to restart your host to have vboxusers take effect.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

Re: Using printers from guest OS

Post by Overwrought »

The extension pack has been installed all along.

I looked under Users and Groups in Linux. I am there under User and vboxusers is there under the Groups tab. Is that what you meant?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Using printers from guest OS

Post by loukingjr »

Overwrought wrote:The extension pack has been installed all along.

I looked under Users and Groups in Linux. I am there under User and vboxusers is there under the Groups tab. Is that what you meant?
yes, you should be a member of the vboxusers.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Using printers from guest OS

Post by mpack »

IMHO, attempting to directly control physical hardware from a VM always leads to hair loss. You would be better off allowing the host OS to own the printer, and access it from the guest via a network share. If you can't get adequate drivers for the host OS then I'm afraid you have to get rid of that printer.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Using printers from guest OS

Post by loukingjr »

There are no Linux drivers for your Canon printer so it's not surprising it doesn't work very well. And mpack is correct that getting hardware to work from a guest is difficult at best. One thing you could try and it would be a pain, is to create a USB filter for the Canon. Of course you would probably have to unplug it after you create the filter, start your Windows guest then plug it back in. Then it may work if you have the Windows driver for the printer installed. maybe. Of course you would have to do that every time you wanted to use it.

Your best bet would be to sell it and buy a printer that has Linux drivers.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

Re: Using printers from guest OS

Post by Overwrought »

mpack wrote:IMHO, attempting to directly control physical hardware from a VM always leads to hair loss.
Sorry, mpack and loukingjr, I've been away for a couple of days and just caught up with your replies. In spite of having started work long before PCs and in the days when you could heat a small village with a main-frame computer, I still have a fair amount of hair left. It's a matter of whether I shed any of it over this problem. :? I'd be sorry to lose the Canon, which produces lovely photo prints. AND I bought a whole stack of ink cartridges last year! Still, there's always ebay.........
Last edited by Overwrought on 15. Jul 2014, 14:05, edited 1 time in total.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

Re: Using printers from guest OS

Post by Overwrought »

Before I give up entirely, please could anyone explain why I got the results in my original posting? The printers are clearly there, as shown by the lsusb command. Why can't the vbmanage command also get them? Perhaps if I understood that, I'd be able to get a result and keep my hair.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Using printers from guest OS

Post by loukingjr »

The short answer is your host computer takes control of them before VirtualBox can.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

Re: Using printers from guest OS

Post by Overwrought »

loukingjr wrote:The short answer is your host computer takes control of them before VirtualBox can.
Is there nothing I can do about that? Some other threads I have read seem to indicate that it is not difficult to use from the guest OS hardware which is connected by USB to the host machine. Have they got it wrong? Is there something odd about this arrangement?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Using printers from guest OS

Post by loukingjr »

As I mentioned in my earlier post you can create a USB filter for them. The only caveat is you have to wait to plug them in until your guests are up and running. There may be another way but I'm not aware of one. Do the drives show in the Devices menu at the top of the guest window when it's running?

the printers aren't USB3 or plugged into a USB port by any chance? VirtualBox does not support USB3 at the moment.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

Re: Using printers from guest OS

Post by Overwrought »

loukingjr wrote:As I mentioned in my earlier post you can create a USB filter for them.
Is there a tutorial anywhere on doing that?
The only caveat is you have to wait to plug them in until your guests are up and running. There may be another way but I'm not aware of one.
The Canon is not always on - I only use it for photos, so there's no point. Is powered off the same as unplugged?
Do the drives show in the Devices menu at the top of the guest window when it's running?
The Devices menu shows no USB connections, if that's what you mean.
the printers aren't USB3 or plugged into a USB port by any chance? VirtualBox does not support USB3 at the moment.
Nothing we've got is USB3.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

Re: Using printers from guest OS

Post by Overwrought »

I haven't just got a problem with the printers - the guest OS cannot see ordinary USB memory sticks either. There must be something wrong with my set-up but I'm not sure what it is.

I have made sure that I have the latest guest additions in the XP guest. Having read some of the User Manual (some of which I understood!), I also looked at the extension pack within VBox, with the following result:
john@john-EP35-DS3R ~ $ vboxmanage list extpacks
Extension Packs: 1
Pack no. 0: Oracle VM VirtualBox Extension Pack
Version: 4.3.12
Revision: 93733
Edition:
Description: USB 2.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM with E1000 support.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:


I went into VBox Settings - USB. There, the USB controller and EHCI Controller are both enabled. I set up a couple of filters, one general and one specific to the Brother printer. Still no recognition within VBox.

Please can anyone point me in the right direction to get the guest OS to see USB devices on the host?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Using printers from guest OS

Post by loukingjr »

I mentioned you should be a member of the vboxusers group but just to be sure, can you run this in a terminal in your Linux Mint Hosts then reboot?

Code: Select all

sudo adduser username vboxusers 
replace "username" with your log in name of course.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Overwrought
Posts: 20
Joined: 4. Apr 2014, 17:45

Re: Using printers from guest OS

Post by Overwrought »

What a star you are, loukingjr!!! That did the trick. Immediately afterwards, I was able to find USB devices from the guest OS. When I switched the Brother printer off and on, XP picked it up as new hardware and I was able to print to it from XP. :D

So far so good. Now to the other machine to see what I can achieve there with the Canon printer.

Thank you so much!!!!!!!!!
Post Reply