With the snapshot complete, I set about installing VirtualBox. First, I download the latest release from the VirtualBox website, as well as the Extension Pack. This is performed as my admin user:
cd ~/Downloads wget https://download.virtualbox.org/virtualbox/6.1.10/virtualbox-6.1_6.1.10-138449~Ubuntu~eoan_amd64.deb wget https://download.virtualbox.org/virtualbox/6.1.10/Oracle_VM_VirtualBox_Extension_Pack-6.1.10.vbox-extpack wget https://download.virtualbox.org/virtualbox/6.1.10/VirtualBoxSDK-6.1.10-138449.zip
In the file explorer, I open the
.deb file with the system’s package manager app. Next, I install the extension pack, agreeing to the license.
For now, I’ll just leave the SDK zipped. That’s for later.
Next, create a user called
sudo useradd -m vbox -G vboxusers sudo passwd vbox
Enter the new password for the
vbox account when prompted. (I used
Next, I modify
/etc/default/virtualbox and add the following lines:
Next, I’ll need to set up some necessary VirtualBox directories.
cd /vault mkdir VirtualBox\ VMs library library/ISOs library/OVAs chown -R root:vboxusers VirtualBox\ VMs/ library/ chmod -R 775 VirtualBox\ VMs/ library/
library directory is where I’ll store my ISO and OVA files, from which I’ll be able to create new VMs. Finally, the
VirtualBox VMs directory will be the default location for all VMs installed on the system. I will, however, store essential VMs on the SSD, so later on I’ll set up a symlink to a special directory in the
vbox user’s home folder, but for now I’ve done enough.
Then I set
vboxweb-service to start on system boot:
sudo systemctl enable vboxweb-service
Finally, I reboot once again. When the system boots up, I check to ensure the
vboxweb port is open and listening:
netstat -peanut | grep LISTEN
If everything worked, there should be a line that says:
tcp 0 0 127.0.0.1:18083 0.0.0.0:* LISTEN 1001 25378 -
(Or something like that.) Essentially, this is saying that there’s something listening on port 18083 as user 1001. Which user is that? I check
Another thing, not super important, but I like to use
bash instead of
sh. I’ll change the default login shell for
/bin/bash in the
Make a system snapshot. Call it “VirtualBox Installed.”