Connecting a Web cam to Virtual Box

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
williepabon
Posts: 21
Joined: 13. Mar 2013, 19:46

Connecting a Web cam to Virtual Box

Post by williepabon »

I have a Logitech Web cam connected tho my Mac mini via a usb port that works very nice with OS-X. When I boot Ubuntu Linux in my VM the camera is identified on Devices > USB devices. I created a filter for the camera on VB Manager, but when I click to select the device I get the following message:
Failed to attach the USB device Logitech Camera [0008] to the virtual machine Ubuntu Linux 12.04.

USB device 'Logitech Camera' with UUID {c15c3711-768b-4432-a287-65c88a74c355} is busy with a previous request. Please try again later.

Result Code: NS_ERROR_INVALID_ARG (0x80070057)
Component: HostUSBDevice
Interface: IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a}
Callee: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
Is there a solution for this? Thanks.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Connecting a Web cam to Virtual Box

Post by mpack »

Try Googling ""busy with a previous request" site:forums.virtualbox.org".
williepabon
Posts: 21
Joined: 13. Mar 2013, 19:46

Re: Connecting a Web cam to Virtual Box

Post by williepabon »

mpack wrote:Try Googling ""busy with a previous request" site:forums.virtualbox.org".
Thanks for answering. I read most of the posts on the search suggested (majority referring to Windows hosts) and tried some of them. The most logical was create a filter for the camera in Virtual Box, disconnect it from the computer, boot Linux guest in VB and then connect the camera to see if it is captured by the guest OS. Sorry, I still get the same error message. Could this be a bug? I'm receiving a message from VB that there is an updated version of the app. Would the problem be corrected on the update? Thanks again.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Connecting a Web cam to Virtual Box

Post by mpack »

"Busy with a previous request" means that the host is using this device. It implies that the redirection filter is not working. There are many possible reasons, most of them user error.

The only bug in this area I'm aware of: have you assigned more than one cpu to this guest?

In fact, post a VM log file (as a zip or other compressed archive) if you want to discuss this further. The VM log file is called "VBox.log", and can be found in the "Logs" subfolder of your VM folder.
williepabon
Posts: 21
Joined: 13. Mar 2013, 19:46

Re: Connecting a Web cam to Virtual Box

Post by williepabon »

mpack:
In fact, post a VM log file (as a zip or other compressed archive) if you want to discuss this further. The VM log file is called "VBox.log", and can be found in the "Logs" subfolder of your VM folder.
As you suggested, I'm enclosing the last two log files for analysis. Thanks again for your effort in solving this issue. Hope that you can open them.Let me know your solution.
wp
Attachments
Virtual_Box_Log.zip
(39.43 KiB) Downloaded 64 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Connecting a Web cam to Virtual Box

Post by mpack »

You are assigning far too much RAM to this guest - I would reduce to 2GB, which your host can more easily afford. Otherwise I see nothing significant in the log.

Is this the built in Mac webcam that you are trying to use? If so then lots of people have had problems. I'm told the trick is to unmount it from the host, after the VM has started, but I'm not a Mac user so I can't suggest more than that.
williepabon
Posts: 21
Joined: 13. Mar 2013, 19:46

Re: Connecting a Web cam to Virtual Box

Post by williepabon »

mpack:

Thanks for the suggestion. No, the webcam is a Logitech usb cam. I would need advice on how to unmount the cam from the Mac mini. I don't have the foggiest idea on how to do this.
wp
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Connecting a Web cam to Virtual Box

Post by mpack »

Well, you'll have to wait for a Mac user to happen by, to offer advice on that.
williepabon
Posts: 21
Joined: 13. Mar 2013, 19:46

Re: Connecting a Web cam to Virtual Box

Post by williepabon »

mpack wrote:Well, you'll have to wait for a Mac user to happen by, to offer advice on that.
Unfortunately, I've left posts with similar requests on the Apple Forums and, no advice from them yet. I'm almost sure this is not an issue of Virtual Box. It has to do with the way OS-X deals with usb web cams that won't permit VBox to capture the camera. There mus be a solution. Anyone?
wp
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: Connecting a Web cam to Virtual Box

Post by ChipMcK »

Suggest
  • in Terminal window (Applications/Utilities), key in vboxmanage list usbhost (hit enter)
    Using the Scroll Bar, scroll up until you locate the the information for the LogiTech Web cam USB device
    Note (copy down) the following attributes
    • VenderID:
      ProductID:
      SerialNumber:
    In VBox GUI, the virtual machine's Settings USB
    • Remove (delete) any existing filters for the Web Cam (highlight, press yellow icon on the right)
      create a filter for the USB device via the green plus sign icon (on the right)
      via the yellow circle icon (also on the right) edit the filter
      Erase/blank out all fields BUT
      • Name:
        Vendor ID:
        Product ID:
        Serial No.:
        Remote:
      Compare the data you wrote down from vboxmanage list usbhost above; they should match
      Press OK button
      Make sure the checkbox is checked
      Exit Settings by pressing OK
    Exit from (quit) VBox
    Unplug the WEB Cam USB
    Start VBox and the virtual machine
    Plug in the Web Cam USB device
williepabon
Posts: 21
Joined: 13. Mar 2013, 19:46

Re: Connecting a Web cam to Virtual Box

Post by williepabon »

ChipMck:
Thank you very much for your help in this problem. I've really have progressed a lot with your advice. I followed your instructions (I guess) to the letter, and now my guest OS (Ubuntu Linux) was able to recognize the camera. The problem now is that there's no input/output from it. Meaning, I went to my sound settings (the camera has built in mike) and the camera mike is there but not working. I tried to use the camera with Cheese Web cam Booth, but no video is produced. I know that the camera is recognized as a device in the OS (UVC Camera (046d:0990) (/dev/video0) but is not functional. Maybe I missed to do something. Hope your advice will help to correct it. Thanks again.
wp
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: Connecting a Web cam to Virtual Box

Post by ChipMcK »

Sounds like the guest OS does not have proper drivers and/or applications for the device.
From your postings the guest is a Linux - not on my knowledge list.
Suggest you pursue in a new post in the world of Linux, like the VBox Linux Guest forum
or another internet site devoted to Linux.

Best
jck
Posts: 1
Joined: 3. Feb 2015, 23:42

Re: Connecting a Web cam to Virtual Box

Post by jck »

This works for me repeatably:
Host machine is windows 8.1, virtual box version 4.3.20, guest machine is Fedora 20.
I have a USB filter set up for my Logitec C210 camera

With VM powered down, I first ensure that Win 8.1 recognizes the webcam. I turn on the windows webcam software and make it do something like 'motion detection'. The I close the software. If I check Control Panel->System->Device manager, I see the webcam on the Imaging Devices list.

Then I power on the VM, and start Fedora 20, and log on as a normal user. Open a terminal, and type "lsusb" and now the webcam shows up on the list of USB devices. If I go back to Windows Control Panel->System->Device Manager, the webcam is no longer listed for windows. Control has been transferred to the VM. The webcam stays disconnected even if I power off the VM - control does not transfer back to Won 8.1, I have to run the logitec SW again to force windows to connect to the webcam.

There is still a problem, in that openCV software, like the sample Video_player.cpp, do not actually access video, so the display screen for the video player is blank. I haven't solved that problem yet.
Post Reply