I have Ubuntu running in VirtualBox on a Windows 7 host machine. How can I make my built-in laptop camera work with it?
7 Answers
This is possible, but requires a few steps to get working properly:
- Make sure the virtual machine is not running and your webcam is not being used.
- Bring up the main VBox window and in the details tab for your Win7 machine click USB.
- Make sure "Enable USB Controller" is selected. Also make sure that "Enable USB 2.0 (EHCI) Controller" or "USB 3.0 (xHCI) Controller" is selected too.
- Click the "Add filter from device" button (the cable with the '+' icon).
- Select your device from the list.
- Now click OK and start your VM.
This will cause the device to show up as if it were plugged into the VM. From there, you should be able to use it or install drivers if necessary.

- 360

- 32,155
The same answer of @Nathan Osman, However , it required to belong to vboxusers
group to be able to see all devices on adding one.
sudo usermod -a -G vboxusers $(whoami)
Logout & login again , check if your vboxusers displays in this command :
groups

- 360

- 9,357
- 9
- 44
- 51
Probably, you should download and install VirtualBox extension pack which will supported USB 2.0 and USB 3.0 devices.
I faced the same issue earlier and I got it solved by installing this extension pack.
- Install the VirtualBox extension pack
- Restart both host and guest system.
Go to Settings --> USB
select USB 2.0 (EHCI) controller
Look in Add new filters.
Now your webcam appears in the list. Add those USB Filters.
Note: My Host is Windows 10 and Virtual Os is Ubuntu 16.04

- 70,465

- 131
-
@Zanna: You can download VirtualBox 5.1.18 Oracle VM VirtualBox Extension Pack from this page https://www.virtualbox.org/wiki/Downloads – Rajesh_Saladi Mar 19 '17 at 07:05
Many built-in cameras will not appear as USB devices.
In this case you need to install the VirtualBox Extension Pack and possibly the Guest Additions (not sure about it).
Then restart the VM and in the top menu Devices there should be a new submenu Webcams. Enable your webcam from there and it should become available in the VM.

- 460
-
I know the question is about Windows as host but for people on Ubuntu with the same problem: The extension pack can be installed via
sudo apt install virtualbox-ext-pack
. After this I had to restart virtualbox and then the webcam showed up in the devices menu. – luator Aug 23 '19 at 07:28
What I had to do, using Ubuntu 20.04, Virtualbox 6.1.
- Install guest additions and extension pack
$ sudo apt-get install virtualbox-guest-additions-iso virtualbox-ext-pack
Add the extension pack via Virtualbox itself. In principle, I guessed with step 1 this won't be necessary. But step 3 below did not find any webcam. So I decided installing this pack. Installation reported an error, but thigns worked fine anyway. Some more work would clarify if any of the two versions of the package can be removed/not installed.
Download the extension pack file (currently 6.1.6), and add it with File -> Preferences -> Extensions -> Adds new package (look for the downloaded file). Note: I have seen mentions that this might have issues if updating VBox, and not updating the extensions. Perhaps doing it viaapt-get
gets rid of this issue.Check if the webcam is recognized, and get its/their name/s
$ VBoxManage list webcams
Video Input Devices: 2
.1 "Integrated Camera: Integrated C"
/dev/video0
.2 "Integrated Camera: Integrated C"
/dev/video1
- Attach webcam to VM
$ VBoxManage controlvm "Win10" webcam attach .1
Ẁin10
stands for the VM name, .1
stands for the webcam as obtained in the output of item 3.
I had my VM running, and right after I run command in item 4, the Win 10 VM detected the webcam as a USB device and automatically started installing it. After about 10 seconds of the installation process (as usual), the webcam was up and running in my Win 10 guest OS.

- 14,674
- 11
- 44
- 97
I followed all the steps from Rajes_Saladi. Need to do one additional step from steps mentioned:
- After booting the guest Ubuntu OS go to menu Devices -> Webcams -> {Tick the Integrated webamera option}
- Run the in built cheese application to verify weather Camera is funcional
Note: I am using integrated webcam of laptop.

- 31
Just tested with windows 10 as host OS and Ubuntu 22.04 as guest system running inside Virtualbox VM:
windows settings > write "webcam" in the search bar > click on "privacy settings for webcams" > check that "allow apps to access your webcam" is activated.
Close all virtualbox instances
Download the installer and update virtualbox
Download and install the VirtualBox Extension Pack (make sure the version of Virtualbox and the extention pack are the exactly the same)
reboot the PC
Start the VM
VB menu "devices" > "upgrade guest additions"
turn off the VM
VB settings (yellow gear) for that VM > "USB" tab > Enable USB controller > USB 2.0 ...
click on "add new USB filter" (green plus)
Here I could not find my camera, so I added the item "Intel Corp. [0001]".
started the VM
(In VB menu "devices" I now see the item "Webcams", but there is none.)
Upgrade guest additions
rebooted the PC
started the VM
VB menu "devices" > webcams > (no webcam item shows up)
VB menu "devices" > USB > unflag the item "...webcam..."
VB menu "devices" > webcams > (now my integrated webcam shows up) click on it.
Ubuntu "show applications" menu > start the "Cheese app" to check if the webcam is working.
and now the webcam is working.
I also noticed that in my case, the item "...webcam..." in menu VB menu "devices" > USB continously turns on, turning off by consequence the webcam item in menu VB menu "devices" > webcams, which disables the webcam.
So I have to switch it on manually.

- 365
apt install virtualbox-ext-pack
. – AvahW Sep 29 '20 at 10:31