Honestly, getting webcams to work in VMware is like one of the most annoying things I've ever attempted. However I finally got this to work, and I've yet to see a good guide about this posted, so I thought I'd post something to help out.
These instructions are for Ubuntu Desktop 9.04, VMware Workstation 6.5.2 build-156735 (the latest at the time of this posting), and a Windows XP guest.
Step 1: Disable the webcam in Ubuntu
First we need to make sure that the webcam cannot be accessed by Ubuntu. If the webcam can somehow be used in Ubuntu then VMware will not be able to gain control over the device which will obviously cause problems. Of course, this means you won't be able to use things like Ekiga, Skype, etc. Personally I don't care about that since I can use Skype in my VMware install if I want. I for sure have to use it with my Polycom PVX software, which is why I'm attempting to do this in the first place.
We need to disable the following kernel modules related to the webcam: uvcvideo (for video) and snd-usb-audio (for audio).
Create a file called /etc/modprobe.d/blacklist.local and add the following lines:
Restart Ubuntu to make sure these modules are disabled.Code:blacklist uvcvideo blacklist snd-usb-audio
Step 2: Make sure VMware can get access to your soundcard
In Linux there are three different soundsystems: ALSA, OSS, and PulseAudio. Ubuntu uses ALSA and Pulseaudio. ALSA is the standard soundsystem which is supported natively in the kernel. VMware, because they're lazy or whatever, I dunno, supports OSS. So we need to make sure OSS is installed and that VMware is able to use it. The following lines should help accomplish that. They install the oss layer and make sure that VMware is able to access the oss libraries. I'm assuming that you've installed VMware and that since you're using Workstation your binary is /usr/bin/vmware. If you using Server or something like that then change these lines accordingly:
If you do not perform this step then there is a good chance that when you fire up your Windows VM you will get this error message:Code:sudo apt-get install alsa-oss echo '#!/bin/bash' > ~/vmware echo 'LD_PRELOAD=libaoss.so exec /usr/bin/vmware.orig "$@"' >> ~/vmware sudo mv /usr/bin/vmware /usr/bin/vmware.orig sudo mv ~/vmware /usr/bin/vmware sudo chmod 755 /usr/bin/vmware sudo chmod +s /usr/lib/libaoss.so.*
Anyways, after you do this, start your VM and verify that you get sound. You may need to set the sound card to use /dev/audio instead of /dev/dsp (VM settings -> Sound Card -> Use physical sound card /dev/audio).Code:Failed to open sound device /dev/dsp: Device or resource busy Failed to connect virtual device sound.
Step 3: Setup the webcam in VMware
First, make sure USB 2.0 support is enabled in VMware (VM settings -> USB Controller -> Enable high-speed support for USB 2.0 devices) and that "Automatically connect new USB devices is unchecked". Automatic connections can probably be checked, but I just like to uncheck it to make sure the webcam gets plugged in at the right time. I should mention that, surprisingly, in these newer versions of VMware USB 2.0 support is implemented properly and you can have it enabled and still use a webcam. Previously you had to disable USB 2.0 support to get a webcam to work. Therefore, if you have a version of VMware Workstation older than 6.5.2 build-156735 I can't promise that USB 2.0 will work properly (it might, but I don't know at what version they fixed USB 2.0 isochronous transfers).
PLEASE NOTE- there is a reason that this guide is for VMware and not VirtualBox. VirtualBox does not implement USB 2.0 isochronous transfers, while VMware does. Until this bug is fixed (http://www.virtualbox.org/ticket/242) you will not be able to use a webcam in VirtualBox with USB 2.0 support enabled. I believe it can still work if you turn of USB 2.0 support however. I haven't tried it recently though.
Anyways, fire up VMware and install the latest Logitech webcam drivers (they have new drivers that install their own "Vid" software, annoying). You may have to reboot Windows to continue the install. When you get to the point where you need to connect the webcam, plug it in and tell VMware to connect it to the running VM (right click the icon in the bottom right corner of VMware and select connect).
You should be able to finish the webcam software install and see at the end that your webcam is working! (I hope).
Hope that someone out there found this useful.



Adv Reply



Bookmarks