Ubuntu – Webcam in VirtualBox (Ubuntu Guest/Ubuntu Host)

virtualboxwebcam

I have already read the following questions:

and yet I still have problems getting my webcam (Lenovo Easy Camera) to work under VirtualBox in an Ubuntu (12.04) Host. The host machine is a Lenovo ideapad U410 running Ubuntu 12.10.

In the host machine the camera is not listed in lsusb, yet works fine with all applications (listed under /dev/video0).

I was wondering if there is anyway to get the camera working in the guest machine.

lsusb in host:

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 002: ID 13d3:5163 IMC Networks 
Bus 003 Device 003: ID 8087:07da Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

P.S.

Even though running an Ubuntu guest inside an Ubuntu host machine (inception!) sounds idiotic, I have some good reasons for that!

Best Answer

Late to the party, but I hope this helps someone out there:

On virtualbox 5.0.14 on Ubuntu Host, with Windows 10 Guest. Should work for Ubuntu or whatnot as guest.

Follow the steps found on Virtualbox Manual

TL;DR:

Do below when the guest OS is running.

~$ VBoxManage list webcams
Video Input Devices: 1
.1 "USB 2.0 Webcam Device"
/dev/video0
~$ VBoxManage controlvm "Windows10" webcam attach /dev/video0

In this case,

  • my guest OS is Windows10
  • the host path or identifier pointing to the host webcam is /dev/video0
  • using default framerate for host Webcam
Related Question