Cannot use FaceTime HD Camera on VirtualBox Ubuntu 18.04 guest OS

I installed Virtualbox & extension pack 6.0.6 on OSX host(on Mackbook pro with Type-c, 2018 15". Mojave 10.14.4). On this VBox configuration, I installed Ubuntu 18.04 as guest with default configuration(no modification to settings except for Enabling USB Controller)

I enabled Facetime HD Camera VirtualBox(Menu bar > Devices > Webcams > Facetime HD Camera checkbox on), but when I test the /dev/video0 and /dev/video1 with cheese command on guest blank screen shows up with this error:

** Message: 15:09:30.041: cheese-application.vala:211: Error during camera setup: No device found
...
...(omitted: one common thing was assertion: device != NULL failed)
...
** (cheese:1592): CRITICAL **: 15:09:30.053: cheese_preferences_dialog_setup_resolutions_for_device: assertion 'device != NULL' failed

Also, the green light on the Macbook indicating that the camera is in use, does not blink at all during the whole process. In addition to that, there's no Application registered to Privacy settings on OSX that has requested Camera access.

I reinstalled VirtualBox, but there's no change after that. I also reinstalled guest Ubuntu but the problem still persists.

I also tried manually attaching camera with terminal command VBoxManage controlvm (vmname) attach .1(or its hardware id starting with 0x), but that does not change anything.


Your problem seems to be that Ubuntu 18.04 doesn't come with support for the FaceTime HD camera out of the box. In addition to setting up VirtualBox correctly (which you seem to have done), you'll also need to install driver support within Ubuntu.

You can use the script given here:

https://gist.github.com/Stono/990ea9f0b3c41606c292f00382d421bf

or download the driver source code manually here:

https://github.com/patjak/bcwc_pcie

The GitHub link also has pointers to a Wiki with more information.