linux-virt kernel doesn't support Virtualbox webcam
Attaching a host’s webcam to a Virtualbox VM requires the uvcvideo driver. This is supported in the linux-vanilla kernel, but not in linux-virt. Since the latter is designed for use with VMs, it should support the Virtualbox webcam out of the box.
Here’s a diff of `lsmod` before and after the webcam was attached to an Apline VM running kernel 4.19.41-0-vanilla:
—- withoutwebcam
+ withwebcam
@@ –1,4 +1,11 @@
Module Size Used by
+uvcvideo 94208 0
+videobuf2_vmalloc 16384 1 uvcvideo
+videobuf2_memops 16384 1 videobuf2_vmalloc
+videobuf2_v4l2 28672 1 uvcvideo
+videobuf2_common 40960 2 videobuf2_v4l2,uvcvideo
+videodev 192512 3 videobuf2_v4l2,uvcvideo,videobuf2_common
+media 36864 2 videodev,uvcvideo
vmwgfx 290816 1
snd_intel8x0 36864 0
ttm 102400 1 vmwgfx
@@ –26,7 +33,7 @@
sysimgblt 16384 1 drm_kms_helper
intel_gtt 20480 1 intel_agp
soundcore 16384 1 snd
-i2c_core 65536 4 drm_kms_helper,psmouse,i2c_piix4,drm
+i2c_core 65536 5 videodev,drm_kms_helper,psmouse,i2c_piix4,drm
ac97_bus 16384 1 snd_ac97_codec
agpgart 45056 4 intel_agp,intel_gtt,ttm,drm
battery 20480 0
@@ –55,6 +62,6 @@
mbcache 16384 1 ext4
jbd2 106496 1 ext4
usb_storage 61440 0
-usbcore 217088 6
ohci_hcd,ehci_pci,usbhid,usb_storage,ehci_hcd,ohci_pci
+usbcore 217088 7
ohci_hcd,ehci_pci,usbhid,usb_storage,uvcvideo,ehci_hcd,ohci_pci
sd_mod 45056 4
scsi_mod 176128 4 sd_mod,usb_storage,libata,sr_mod intel_gtt 20480
1 intel_agp
soundcore 16384 1 snd
-i2c_core 65536 4 drm_kms_helper,psmouse,i2c_piix4,drm
+i2c_core 65536 5 videodev,drm_kms_helper,psmouse,i2c_piix4,drm
ac97_bus 16384 1 snd_ac97_codec
agpgart 45056 4 intel_agp,intel_gtt,ttm,drm
battery 20480 0
@@ –55,6 +62,6 @@
(from redmine: issue id 10545, created on 2019-06-08, closed on 2019-06-19)