A group of friends I haven't seen since well before COVID-19 wanted to have a Zoom gathering. I wanted to see them, but all the recently revealed security issues around Zoom had me concerned. So I decided to run Zoom in a clean virtual machine, and dispose of the VM after I was done.
The VirtualBox Guest Additions offer a number of features (see my source https://www.virtualbox.org/manual/ch04.html for more details about any of these):
- Mouse pointer integration - these days most Linux OSes are VM-aware enough to do this on their own, but it's a real benefit if your Linux version doesn't support it
- Shared folders - I didn't need this for this project, but shared folders are awesome: it allows a folder(s) that both the guest and the host can write to, thus sharing files
- better video support - by default, new VM installs are locked to 1024x768 or some similarly small value: this allows them to support whatever size you resize the VM's window to ... this is what I was most looking for this time around
- Seamless windows - this is interesting, but I haven't been a fan
- Generic host/guest communication channels - I haven't tried this
- Time synchronization - I've had a lot of problems with time syncing in guests without this: if you suspend the host, the guest doesn't know any time has passed unless this is installed
- Shared clipboard - share cut-and-paste between host and guest, hugely useful
- Automated logins - I haven't tried this
What I did this time:
- install Debian as a guest machine in VirtualBox
- in the guest
apt install build-essential dkms linux-headers-amd64
- linux-headers-amd64 means (I think) "install the headers for the current kernel." This avoids - without addressing - an important distinction between the running kernel and the most recently installed kernel, which aren't necessarily the same. You would be wise to make them the same by rebooting before running this command if there's a newer kernel installed than the running kernel. If your VM is a brand new install, don't worry about this. If you want to be explicit, use
apt install build-essential dkms linux-headers-$(uname -r).
- I'm doing this because the next thing I'm going to install is the VirtualBox Guest Additions, which needs to rebuild the kernel in the VM (you can install the Guest Additions before the stuff to build the new kernel, but if you do A) it can't work until you install the other stuff, and even if you install the apt packages later, the VM requires at least a reboot to do the rebuild, and doesn't always succeed in working until you install the GA again anyway ... trust me, this order is better)
- in the VM's window, click "Devices" -> "Insert Guest Additions CD image...".
- VirtualBox will probably complain that the image isn't available, should it download it? ... you don't have much choice, do you? Oracle gets their statistics for a download, you get your disc image ...
- "inserting" the CD will most likely result in a dialogue from the VM OS about what to do with the CD: whether or not it's opened in the file manager isn't very important but we do want it mounted, so if in doubt let it open in the file manager
- at the command line, find out where the CD is mounted
- I used
lsblkwhich told me that sr0 was mounted at /media/cdrom0
- at a root command line,
- run (with elevated privileges)
sh ./VBoxLinuxAdditions.run --nox11
- this will take a couple minutes, and the last thing it says is "Running kernel modules will not be replaced until the system is restarted," so that's your next step: restart the VM
- at this point, resizing the window should cause a resize of the VM/desktop inside it
Unfortunately, for all that, the webcam didn't work inside the VM. It's possible to go to the VM's settings and then the USB section, and add a filter to allow the webcam, but if your only choice is "USB 1.1 (OHCI) Controller" then it probably won't work. I've always used
guvcview as a test application (it's very lightweight, but will require a package installation). When run from the command line, it reported (once a second until I hit Ctrl-C) V4L2_CORE: (get_v4l2_frame) video stream must be started first. The remedy for this - or at least the one I took - was to install the Extension Pack. Why this isn't a part of VirtualBox by default I'm not sure. Possibly because Oracle doesn't want to open source this part, or because they want to know how many people are downloading it, or possibly even for some more nefarious purpose. The Extension Pack offers: "Support for USB 2.0 and USB 3.0 devices, VirtualBox RDP, disk encryption, NVMe and PXE boot for Intel cards." I was looking for USB 2.0 (at least). To install:
- go to https://www.virtualbox.org/wiki/Downloads and look for the "VirtualBox 6.1.4 Oracle VM VirtualBox Extension Pack" header. Download it.
- on the first system I installed on (which was running KDE, unlike the one detailed here), all I had to do was double-click on the download: it opened in VirtualBox, offered to install, asked for privilege escalation to install system components ... and I was done after giving the root password
- on this system, double-clicking on the file in the file manager (PCManFM) opened VirtualBox ... but didn't offer to install
- so I ran
/usr/lib64/virtualbox/VirtualBox /home/giles/Downloads/Oracle_VM_VirtualBox_Extension_Pac k-6.1.4.vbox-extpack... this offered to install, but then failed because it couldn't get privilege escalation from the terminal it was started in
- I repeated the previous command line, this time in a "root" terminal, and the install went perfectly
- now when I went to the "Settings -> USB" for any machine, I had options for "USB 2.0" and "USB 3.0"
- select at least USB 2.0 for webcams
- add a filter (still in "Settings -> USB") to allow the specific cam you want available on the specific machine
The final piece of the puzzle was Zoom itself. I went to https://zoom.us/download?os=linux inside the VM and chose the Debian download option. This provided a deb file that was installed with
apt install zoom_amd64.deb (as root).
apt installed several dependencies, but the installation was very straight-forward. From there, Zoom ran fine: I had a couple problems though. After cranking the volume up everywhere I could find on the host and guest, the sound output was still too low, so I ended up wearing a headset for the entire call (this has the useful side-effect of (probably) eliminating feedback issues from me). And all of the video was chunky - with about 16 participants, I was seeing frame updates about once or twice a second for all participants. Having never used Zoom in any circumstances, I'm not sure if this is common - perhaps it is when you have a lot of participants? Sound quality was very good though (except for the volume).