This may help you access the USB devices in your guest OS hosted in Ubuntu
First install dkms to your host Ubuntu:
sudo apt-get install dkms
Next install Gnome-System-Tools to your host Ubuntu:
sudo apt-get install gnome-system-tools
Now launch the application - Users and Groups in host Ubuntu. If you're using Gnome you can do this by tapping the Super key and type user then click Users and Groups icon to start up the User Settings.
Click Manage Groups, find vboxusers, click properties, add your own user name and any other desired users to the vboxusers group. Click Ok. Alternative to using this GUI tool to add user to the group is to use the command sudo usermod -a -G vboxusers $USER
.
It will also prove useful to ensure guest additions (enables features like mouse pointer integration, shared folders, shared clipboard, etc.) and extension pack (adds features like USB 2.0 and USB 3.0 Host Controller, Host Webcam, etc.) are installed. On command line, in host Ubuntu, use:
sudo apt-get install virtualbox-guest-additions-iso
and
sudo apt-get install virtualbox-ext-pack
.
To install guest additions in guest Ubuntu, click on "Devices" > "Insert Guest Additions CD Image..." . Then start a file browser e.g. Nautilus (in Ubuntu), Thunar (in Xubuntu). Here, in the side pane, you will see a new CD image been mounted. Click to go into the folder. Now right click and select to open a terminal in this directory. Then you should run the VBoxLinuxAdditions.run
script with sudo privilege, as: sudo ./VBoxLinuxAdditions.run
. This will install the guest additions. Alternatively, you can select to Run the script, as allowed by a dialogue box as soon as the guest additions ISO is mounted.
Next you'll have to log out and back in. Now start VirtualBox and proceed with adding the USB devices.
Start the VirtualBox Manager. Select one of the virtual machine of choice from the side panel. Then select from menubar: Machine -> Settings (Ctrl+S). Then in the dialog box select USB, then check on Enable USB Controller. Then based on whether your Webcam is a USB 2 or USB 3 device, select USB 2.0 or USB 3.0 radio button. Next, go to the Add USB device filters and add and checkmark the Webcam filter for your device.
Now you can start the virtual machine and use your webcam in there.