Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th October 2008, 16:50
atjensen11 atjensen11 is offline
Senior Member
 
Join Date: Dec 2007
Posts: 199
Thanks: 9
Thanked 6 Times in 6 Posts
Default Sharing a USB Printer with Samba and Xen

Okay, so I have been really experimenting with Xen and trying to virtualize many of my machines with different configurations.

I have had a lot of success with using the pciback.hide command with Network Adapters and then assigning them to a VM in the configuration file. One of the virtual machines is a Samba print server which I would like to add print server abilities with CUPS and Samba. I thought I would try same PCI hiding technique for the USB printer.

Here is some background:
Code:
root@big10:~# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 03f0:6204 Hewlett-Packard DeskJet 5150c
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
root@big10:~# lspci | grep USB
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
I have tried only forwarding the USB controller that has the printer plugged in. I saw the printer (/dev/usb/lp0) in the VM, but test prints to the printer resulted in a bunch of jibberish printed on the paper. I tried forwarding all the controllers with the same result.

Has anyone had any luck and willing to share how they set up a USB printer in a VM?
Reply With Quote
Sponsored Links
  #2  
Old 18th October 2008, 16:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Are there maybe any errors in your logs?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 28th October 2008, 20:56
atjensen11 atjensen11 is offline
Senior Member
 
Join Date: Dec 2007
Posts: 199
Thanks: 9
Thanked 6 Times in 6 Posts
 
Default

I thought I had responded previously, but it doesn't appear that way.

Anyhow, I did check several log files related to my attempts to hide portions of the USB Controller and/or devices from the Xen Dom0 machine and then specify them in a DomU.

At some points, it appeared as though I might be successful in that when I looked in the /dev folder on the DomU, I would see the link created for the printer just as it was automatically created when I plugged the printer into the Dom0 machine. This was promising too from the standpoint of when I went into CUPS and installed a printer, one of the options in the drop down included the USB printer.

However, print jobs sent to that printer always failed and littered my logs with errors, none of which seemed decipherable by me.

Even when the USB printer was shown, if I ran the lsusb command on the DomU, it never returned any devices. So it never appeared as though the device was actually installed as a USB device.

In the end, I just left the printer installed on the Dom0 and configured Samba to share it out to my network. It wasn't the ideal work around, but it is working for the time being.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.