1

There are many questions and instructions out there about how to add a webcam to a VM, under Ubuntu host OS (in particular, with Win 10 guest OS, but this is likely irrelevant).

How can I use my webcam with Ubuntu running in VirtualBox?

https://forums.virtualbox.org/viewtopic.php?f=8&t=87398

https://scribles.net/using-webcam-in-virtualbox-guest-os-on-windows-host/

I have found how to do that, and I posted an answer. It requires as a last step to attach the webcam to the VM, via command line. But for that command to be valid, the VM has to be running, otherwise an error pops

$ VBoxManage controlvm "Win10" webcam attach .1
VBoxManage: error: Machine 'Win10' is not currently running

This other answer to the same question shows an alternative to the last step. With the VM running, go to Devices -> Webcams -> Tick the checkbox.

In any of the two cases, whenever the VM is shut down, and later restarted, the webcam starts detached, and the last step (either via CLI or VM menus) has to be manually performed.

Is there any way to get the webcam on/attached by default?

EDIT As per comment, I am posting some more info.

  1. Only the relevant lines of lsusb here.
    $ lsusb -t
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
        |__ Port 8: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 8: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
  1. VBoxManage
    $ VBoxManage list webcams
    Video Input Devices: 2
    .1 "Integrated Camera: Integrated C"
    /dev/video0
    .2 "Integrated Camera: Integrated C"
    /dev/video1
  1. With the VM running, Devices -> Webcams shows to identical items, Integrated Camera: Integrated C.

In all cases, I wouldn't know why it is showing two webcams.

  • @N0rbert - Please see edited OP. With lsusb I see two webcams. With Devices -> Webcams I see the same two devices. So are they usb or not? And with these details, how to proceed? Thanks. – sancho.s ReinstateMonicaCellio May 11 '20 at 15:57