LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-20-2018, 12:37 AM   #1
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Queensland
Distribution: Fedora 30; HP Pavilion 8Gb and Acer Aspire 16Gb; both Intel Core-i7
Posts: 282

Rep: Reputation: 22
QEMU/KVM with WinXP client: how to get printing working?


I have searched using Google and here I have searched the forum, all without success. Google turned up a few possibilities, but they turned out not to be helpful to me at my current level of knowledge.

I have 32bit XP running in a QEMU/KVM virtual machine. I now want to do some printing from the client, but I can't work out how to set up the client to do this.

The client can ping the host, but it cannot browse the Internet, for example.

Can anyone help, or point me to a SIMPLE primer that will take me through it step-by-step?

Thanks in advance.
 
Old 10-20-2018, 08:12 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,270

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Sounds like you have the guest set up ok and just need to get traffic passing through the host. Networking is a complex topic, but here's a guide that covers just virtual setup.

https://wiki.libvirt.org/page/VirtualNetworking

I don't know the details of your setup but you may just need to set up NAT and turn on packet forwarding.
 
1 members found this post helpful.
Old 10-20-2018, 07:21 PM   #3
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Queensland
Distribution: Fedora 30; HP Pavilion 8Gb and Acer Aspire 16Gb; both Intel Core-i7
Posts: 282

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by smallpond View Post
Sounds like you have the guest set up ok and just need to get traffic passing through the host.
Yes, that's the case. The client WinXP runs as well as it ever did (smile) and I now have a need to get the network running between guest and host. My host is connected to my home network OK.

Quote:
Originally Posted by smallpond View Post
Networking is a complex topic, but here's a guide that covers just virtual setup.

https://wiki.libvirt.org/page/VirtualNetworking

I don't know the details of your setup but you may just need to set up NAT and turn on packet forwarding.
Thanks very much for the link - I will study it well and no doubt learn all about NAT and packet forwarding. "8-)
 
Old 10-20-2018, 08:51 PM   #4
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Queensland
Distribution: Fedora 30; HP Pavilion 8Gb and Acer Aspire 16Gb; both Intel Core-i7
Posts: 282

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by Doug Hutcheson View Post
Thanks very much for the link - I will study it well and no doubt learn all about NAT and packet forwarding. "8-)
Well, I now know more about NAT than I did earlier today ... but it has not helped. Sigh

I followed the instructions at your link, but still cannot 'see' the Internet from the client. As before, I can ping the host successfully. BTW, the content of the link did not refer specifically to packet forwarding and I wonder if this is a firewall setting I need to implement?

I will keep digging.
 
Old 10-21-2018, 11:36 AM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,360

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Quote:
I have 32bit XP running in a QEMU/KVM virtual machine. I now want to do some printing from the client, but I can't work out how to set up the client to do this.
My technique for this is to:
- Have CUPS running on the host with a raw printer queue for the printer to be used.
- Have Samba running on the host to make the CUPS printer queue available.
- Have networking set up so that the client can see the host printer resource. For this, I use a bridge interface on the host containing my real NIC and a tap interface. When starting the VM, I use these options to qemu-kvm
Code:
-net tap,ifname=tap0,script=no,downscript=no
-net nic,model=virtio
The second of those options assumes that the virtio-win drivers have been installed on the client.
You also need to have the native Windows printer driver installed in the client.

The cheat technique is to install a PDF printer in the client, then print the generated files from the host.
 
Old 10-21-2018, 10:47 PM   #6
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Queensland
Distribution: Fedora 30; HP Pavilion 8Gb and Acer Aspire 16Gb; both Intel Core-i7
Posts: 282

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by allend View Post
The cheat technique is to install a PDF printer in the client, then print the generated files from the host.
Thanks for all the help allend and smallpond - much appreciated.

I have finally arrived at a working solution, although some of the journey demanded the use of incantations and spells!

My WinXP guest was able to ping my network router and a ping to www.google.com was correctly handled, so I surmised my network was already functioning perfectly.

Although my printer is shared from the host, WinXP could not see it. After much wrestling and swearing, I decided to key in the CUPS name and address of the printer as the URL in the 'Add Printer' wizard in XP. The printer is an HP6950 for which there are no XP drivers, so I just picked the highest-numbered colour driver in the XP's list - HP Deskjet 990c. To my amazement, it worked first time, test page and all!

Then I battled with XP's version of Internet Destroyer. So many things are crippled and broken in this software, I ended up installing Opera 36 and again it worked first time.

Now if only I could connect XP to my Public folder so I might easily transfer files between host and guest, I would be ecstatic ...
 
Old 10-22-2018, 12:28 AM   #7
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Queensland
Distribution: Fedora 30; HP Pavilion 8Gb and Acer Aspire 16Gb; both Intel Core-i7
Posts: 282

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by Doug Hutcheson View Post
Now if only I could connect XP to my Public folder so I might easily transfer files between host and guest, I would be ecstatic ...
Google was my friend. I found and adapted the instructions at https://www.server-world.info/en/not...28&p=samba&f=1 and all worked as it said on the packet.
 
  


Reply

Tags
qemu kvm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 08:41 AM
[SOLVED] Virtual XP guest shuts down when spice client disconnects from qemu-kvm allend Slackware 3 03-22-2012 10:34 AM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 03:05 PM
LXer: Attempt of qemu-kvm-0.14 patching via Gerds Hoffmann spice/qxl: locking fix for qemu-kvm on LXer Syndicated Linux News 0 03-14-2011 02:20 PM
[SOLVED] winxp in qemu+kvm on ubuntu 10.04: extremely poor performance [GOD]Anck Linux - Virtualization and Cloud 2 12-02-2010 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration