Start a VM with the webcam on
Posted: 10. May 2020, 20:09
I am using VirtualBox Graphical User Interface Version 6.1.6_Ubuntu r137129, under Ubuntu 20.04, with a guest OS Win 10 (although this is likely irrelevant).
I have found how to use a webcam in the guest, using the extension pack (I managed to do this having both installed package virtualbox-ext-pack and added the package via File -> Preferences in Virtualbox; I am not sure both are needed at the same time).
This 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
As an alternative to the last step, with the VM running, I can 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?
I have found how to use a webcam in the guest, using the extension pack (I managed to do this having both installed package virtualbox-ext-pack and added the package via File -> Preferences in Virtualbox; I am not sure both are needed at the same time).
This 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
Code: Select all
$ VBoxManage controlvm "Win10" webcam attach .1
VBoxManage: error: Machine 'Win10' is not currently running
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?