VMware

This Question is Answered

1 "helpful" answer available (6 pts)
6 Replies Last post: Sep 19, 2008 7:10 AM by gbullman  

Host Printer Setup - Fusion 2.0 Upgrade Experience posted: Sep 17, 2008 4:39 AM

Click to view gbullman's profile Expert 372 posts since
Jan 29, 2008

I just upgraded to Fusion 2.0 on a MacBook Pro, running 10.5.5. I have 2 Windows XP SP3 VMs that I have upgraded after upgrading Fusion; one of them was created back in January with the VMware Free converter, the other was created with Windows Easy Install with Fusion 1.1.x. Both VM upgrades went pretty similarly including upgrading VMware Tools. In both cases there were a bunch of adding new hardware ballons that did not need my intervention, and one add new hardware wizard which I did not touch (it came up while VMware Tools was upgrading, and I figured that once VMware Tools upgrade was complete the need for running that wizard would be gone).

In both cases I changed settings prior to starting the VMs to Enable use of my Mac's printer and to use the Mac default as the VM's default printer. For the VM created with Windows Easy Install this seems to have worked all the way, I have an entry for my Mac's printer and can print to it (only tried test page so far). For the converted VM the equivalent printer mapping to my Mac's printer was not created. Is there a way I can force this to be created? It is worth noting that the printer in this case is a network connected HP All-in-One, and the converted VM did have the Windows HP software installed and was able to print to this printer prior to the upgrade. I have removed the HP software from the VM and I'm hoping I can just get it to use the Mac's resources for this same printer. One other note is that the Easy Install printer had an old entry that was created by Fusion 1.1.x that seems to play a role with the port for this new printer.

So far the Windows Easy Install VM has had a svchost process initially more or less run away (close to 100% CPU utilization in Task Manager, and VM process about 100% in Activity Monitor) before I get a message that the svchost process has failed. After svchost failure the VM calms down to 1.1.3 CPU levels (4 to 10% in Activity Monitor). I'm going to look through the XP event logs today to see if I can get an idea of what is going on with that.

Any suggestions on how to get the printer to appear and functional on the converted VM?

The use of printers in this manner is an important feature for me in how I use the VMs. Also appreciating the ability to mount the VM disks without booting up the Virtual Machines.

I'm considering converting the converted VM into a vwware package like the Easy Install one. Is there any known pros or cons to doing this?

Click to view mudaltsov's profile Expert 304 posts since
Nov 12, 2007
(answering questions from both of your previous posts)

For the converted VM the equivalent printer mapping to my Mac's printer was not created. Is there a way I can force this to be created?
This should be done automatically, if it's not happening, most likely something else is wrong that will prevent printing from working even if you somehow set it up manually. It would be best to troubleshoot this to discover the real issue that's causing it not to work.

It is worth noting that the printer in this case is a network connected HP All-in-One, and the converted VM did have the Windows HP software installed and was able to print to this printer prior to the upgrade. I have removed the HP software from the VM and I'm hoping I can just get it to use the Mac's resources for this same printer.
Correct - you don't need any manufacturer-specific drivers to use the ThinPrint implementation. ThinPrint provides a custom printer driver in the guest which communicates to the host via a virtual serial port. There's another program on the host that prints to the printer using the host's CUPS printer drivers. Of course, if you want to use any special features that are not provided by the ThinPrint driver, you need to set up the printer manually (via network or USB), with the manufacturer drivers.

One other note is that the Easy Install printer had an old entry that was created by Fusion 1.1.x that seems to play a role with the port for this new printer.
Do you mean a printer named "_#VMwareVirtualPrinter"? That was a template used by an older version of the ThinPrint software, that was added for VMware Workstation and ACE (they share common Tools with Fusion, even if not all features work). The old version was only usable by Windows hosts, so it doesn't work in Fusion. It should be safe to delete it (though it should have happened automatically when you upgraded Tools).

I'm considering converting the converted VM into a vwware package like the Easy Install one. Is there any known pros or cons to doing this?
Do you mean your converted VM is in a folder instead of a .vmwarevm bundle? There should be no difference between the two for running the VM or printing. However, one thing that you may notice is that shared applications from Windows (from the Applications folder next to the .vmx file) will show up in Spotlight when you use a folder instead of a .vmwarevm bundle. If you really want to use a bundle, you can just add the ".vmwarevm" extension in Finder's Get Info dialog. Then you may need to remove the old entry from the VM Library, and add the VM bundle. If it asks you if you moved or copied it, you can choose "moved" since you just renamed it.

Approach 1 - use the TPAutoConnect utility that it appears VMware Tools uses to set up the printer. When I run this via command line with a -? option there is nothing about installing a printer, only removing them.
There should be no need to do this manually - it's supposed to be done automatically. The VMware Tools service (VMwareService.exe) starts the ThinPrint service (TPAutoConnSvc.exe), which will run TPAutoConnect.exe to automatically configure the printers. The ThinPrint driver communicates with the VM process (vmware-vmx) on the host, which talks to a ThinPrint client process (thnuclnt) to collect printer information and perform print jobs.

Approach 2 - Use the Add Printer Wizard in Windows, by comparing to the other VM it appears that I should use the local TPVM port, and I think I should probably use the ThinPrint make of printer, but then not sure which driver to use (thinking it is the TP Output Gateway PS). I may go ahead and try that to see what happens, but was hoping someone could give me some guidance on how best to proceed.
Again, there should be no need to add any printers manually. See below for some troubleshooting tips.

Should I just look for more information on ThinPrint on the internet, or is setting this up pretty specific to VMware, in particular Fusion?
The ThinPrint solution used by Fusion is pretty specific to VMware - ThinPrint is a third-party company that provided the host and guest side components, but Fusion and Tools configure them to work in a VM environment specific to VMware products.


Since your other VM works fine, the host-side ThinPrint components are most likely set up correctly, and it's just one VM that has issues. Here are some things to try:

1. Completely uninstall VMware Tools using Add/Remove programs. If the "_#VMwareVirtualPrinter" printer template is still there, remove it manually. Make sure to restart the VM afterwards.
2. Install Tools from Fusion 2.0 (Virtual Machine -> Install VMware Tools menu). Check that the correct version is installed by double-clicking on the Tools icon in the task bar to open Tools Properties, and look at the About tab. It should be build 116369).
3. Look in the Windows task manager and see if the following processes are running: TPAutoConnSvc.exe and TPAutoConnect.exe
Click to view Larry Ingalls's profile Novice 5 posts since
Sep 7, 2008

I had the same problem with my HP all in one L7780. Windows could not see it through my network in Fusion.

The Printer is using a fixed address. It thinks that it is directly connected to your computer, even though in reality it is going through a network.

The printer has a fixed IP address. My fusion softwre was trying to re assign an IP address and couldn't find one.

I assigned a static IP address to my computer connection and it works great now.

I say I, actualy it was a friend of mine who did it for me.

Larry

Click to view mudaltsov's profile Expert 304 posts since
Nov 12, 2007
I have a feeling that thnuclnt only runs to pass along a print job since I don't see it on either machine when nothing is being printed.
The thnuclnt process runs on the host, and is started by vmware-vmx when the VM is powered on (if it has Printing enabled). While the VM is running, you should be seeing multiple thnuclnt processes - it spawns additional child processes for various tasks. An additional child process is spawned to do the print job as well.
Could you check if you see them in Activity Monitor with "All Processes" selected instead of "My Processes". If that's the case, what User are they started by? If it's "root" instead of your username, that may be a problem. Of course, if they're not running at all, that's also a problem.
Do you see the same behavior for the other VM that works correctly? Also, try to see if thnuclnt starts up when you first power on the VM, it's possible that something causes the process to crash.

The new most interesting information is that I tried to disable using the Mac printing while the problematic VM was running and got a diallog box indicating that could not be performed because the serial connection was active (don't remember for sure if I had a manually created a Printer in place at that time or not). I tried disabling using the Mac printer a 2nd time, and this time it crashed the VM, and I'm attaching the VMware log file that covers both of those attempts.
The log shows an error that it wasn't able to delete the temporary directory used by thnuclnt, which means it was either still running, or some files had different permissions that the user can't delete (owned by root, etc).

The last item that I'm wondering if I can do something about is the TPVM port that currently exists on this VM. I don't know when it was created, if it is working properly. By looking through the Registry of the VM it looks like it is using the COM2 port on the Guest, and I do have the Serial Port Device in place on the host (via the VM setup Preference Panels).
The TPVM port is created by the ThinPrint driver, and it is used for the printers added by TPAutoConnect. It uses the virtual serial port to communicate with the host. The .vmx file shows the ThinPrint serial port as serial0, which should be COM1. So if the VM is trying to COM2, that may explain why it's having problems. Do you have any other serial devices in your VM? (Settings -> Other Devices).

You can look under "HKEY_LOCAL_MACHINE\SOFTWARE\ThinPrint\TPAutoConnect" to look at the ThinPrint properties. The "ListenToWTSCreatCmd" string should have the COM port that TPAutoConnect uses. This should match the TPVM port configuration from "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\ThinPrint Print Port Monitor for VMWare\Ports\TPVM:", and also the .vmx setting (serial0 is COM1, serial1 is COM2, etc). Actually, I think there might be an issue with Windows only seeing two serial ports, so ThinPrint might not work on COM3 and COM4 unless those ports are the Device Manager, but it works on COM1 and COM2 for me.

Is there some orderly set of steps to remove the pieces that support printing via the Mac and then add them back in such that the auto creation of the printer in the guest would occur?
Unchecking the Enabled checkbox in Printers should disconnect the virtual serial port, and prevent thnuclnt from starting. You can enable it while the VM is running to re-connect the serial port and restart thnuclnt (unless you run into the crash you described above).

At this point I suspect I have some registry cleanup to do in the Guest, but not sure what that would be. I'm suspecting that TPAutoConnect sees items in the Guest that make it think the printer was already created even though the printer itself is not there.
Uninstalling Tools should remove the ThinPrint drivers and the TPVM port configuration. But since you already uninstalled and reinstalled Tools, I'm not sure how much of a help that may be. Of course, it's possible that the old settings were not removed from the registry for some reason, and are now interfering with the new setup.

I've been toying with taking the backup of this particular VM prior to the upgrade, bringing it up on VMPlayer on Windows and removing the HP and Bonjour Software and starting over, but that will also mean some data synchronization since I have used the upgraded one for its' intended purpose of work productivity.
The HP and Bonjour software should have no effect on the ThinPrint functionality.

Has VMware put together any white papers or Knowledge Base articles that would give me more details on what is needed on the Guest to support printing through the Host. It is pretty clear to me that my host side stuff is working with the other VM, so it is either something specific to this other VM or the VM itself.
I don't think there's any articles on this besides forum posts. The ThinPrint implementation is new for Fusion 2.0, and I haven't had the time to write anything up yet. I primarily worked on the Fusion UI and host-side support for ThinPrint, and another developer worked on integrating guest-side components in Tools. It's definitely something that we need to document to make troubleshooting easier.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities