After I unwittingly upgraded from openSUSE 10.2 to openSUSE 10.3, I wasn’t able to configure VMWare Workstation 6.0 on openSUSE 10.3 so ended up downloading the updated 6.0.1 version of VMWare Workstation. This fixed my issue with being able to configure it and run my guest operating systems but changing from the 2.6.18 kernel to 2.6.22 appears to have introduced another issue.
Note: I have found the solution to the issue. Refer to the 04 October Update below for more details.
I print directly onto CDs and DVDs using a Canon Pixma ip4300 printer when producing Linux CDs for my Linux CD Mall website. There are printer drivers available from Turboprint for Linux for this particular printer but I’ve found it’s easier to simply connect the printer to the Windows XP guest and use the drivers in Windows instead of in the Linux host. The CD printing software also only runs on Windows so I need to run that in the guest operating system anyway.
After getting VMWare running again, I went to print a CD label and discovered the printer wasn’t connected. This isn’t unusal because I’ve often found after not using the guest for a few hours the USB connection seems to somehow become disconnected. All I need to do to connect the printer back to the guest is to select VM -> Removable Devices -> USB Devices from the Vmware Workstation file menu and then select the printer.
I went to do this but there was nothing listed under the USB Devices submenu; it just said “empty”. I verified the printer was actually connected to the computer, and checked the Linux system log to see that it was registering the device.
The output from the system log when I pulled the USB cable out of the computer was as follows:
Sep 20 11:19:10 desktop kernel: usb 2-7.3: USB disconnect, address 13
And the output when I plugged it back in again was as follows:
Sep 20 11:19:15 desktop kernel: usb 2-7.3: new high speed USB device using ehci_hcd and address 15
Sep 20 11:19:15 desktop kernel: usb 2-7.3: new device found, idVendor=04a9, idProduct=10b6
Sep 20 11:19:15 desktop kernel: usb 2-7.3: new device strings: Mfr=1, Product=2, SerialNumber=3
Sep 20 11:19:15 desktop kernel: usb 2-7.3: Product: iP4300
Sep 20 11:19:15 desktop kernel: usb 2-7.3: Manufacturer: Canon
Sep 20 11:19:15 desktop kernel: usb 2-7.3: SerialNumber: 9128CC
Sep 20 11:19:15 desktop kernel: usb 2-7.3: configuration #1 chosen from 1 choice
Sep 20 11:19:15 desktop kernel: drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 15 if 0 alt 0 proto 2 vid 0x04A9 pid 0x10B6
So all looking good there. But the Removable Devices -> USB Devices was still showing “empty”.
I did a fair bit of searching on the Internet and couldn’t find any resolution, although it does appear that the location of USB devices may have changed between openSUSE 10.2 and 10.3, kernels 2.6.18 and 2.6.22 which may be causing the issue: VMWare isn’t sure where to pick the information up from.
Not quite sure what to do next, I thought maybe I should try plugging in another USB device and see if it can detect that. So I pulled out a USB memory stick, unplugged the printer and plugged in the memory stick. Nope, still didn’t detect it. The USB connection I plug my printer into is on the monitor, so I wondered if plugging the USB stick into one of the ports on the front of the computer might make a difference. I plugged the printer back in, and then plugged the stick into one of the front ports.
When I checked Removable Devices -> USB Devices again there was no memory stick, but to my surprise the printer was now there… I’ve messed around with this a little, and as long as I have the focus on the virtual machine, have some other USB device also attached, unplug the printer, leave the cable out for a few seconds and then plug it back in again, I seem to be able to connect the printer to the guest, although sometimes it takes a couple of goes. Hopefully this issue will be fixed in later revisions of VMWare Workstation, or in kernel updates.
Update 28 September 2007
I did an update today which updated the kernel from 188.8.131.52-18-default to 184.108.40.206-29-default and it seems to have fixed this issue, ie I no longer seem to have issues connecting the printer to the virtual machine.
Update 01 October 2007
Hmm maybe not, it’s still completely random about whether it works or not. Sometimes I have to plug, unplug, plug, unplug devices etc etc to get it to see any USB devices. And sometimes I can only get it to work with a reboot of the guest operating system. What a pain.
Update 04 October 2007
I found this page in the VMWare knowledge base which talks about the issue and the solution. It appears to come down to some Linux distros (such as openSUSE which I am currently using) not mounting the usb filesystem at /proc/bus/usb automatically.
The line in the /etc/fstab file which deals with this is as follows:
usbfs/proc/bus/usbusbfsnoauto 0 0
Changing it to the following will fix the issue out on reboot:
usbfs/proc/bus/usbusbfsauto 0 0
To fix the issue without rebooting (although you still need to modify /etc/fstab so it still works on restart) you need to mount the usbfs like so, either as root or using sudo:
The knowledge base post says to do this
mount -t usbfs none /proc/bus/usb but it didn’t seem to work for me, so I umounted it and then did as in the block above. I also shut down all guest operating systems and restarted the VMWare Workstation client. Once it started up again I was able to access all the connected USB devices.