Installing Virtualbox Guest additions on Ubuntu server
One way to gain more performance, as well as features such as folder sharing between guest and host, is to install the VirtualBox Guest Additions. For a host that includes a GUI, it’s as simple as starting the host, clicking Devices | Insert Guest Additions CD image, and then following the steps. Unfortunately, installing this package on a GUI-less Linux server isn’t as straightforward. Here are the steps to install this package on a Ubuntu server with no GUI.
Installing the Guest Additions on a GUI-less server
- Start VirtualBox.
- Start the host in question.
-
Once the host has booted, click Devices Insert Guest Additions CD Image. - Log in to your guest server.
- Mount the CD-ROM with the command
sudo mount /dev/cdrom /media/cdrom.
- Create folder and change into the mounted directory with the command
sudo mkdir /media/cdrom cd /media/cdrom.
- Install the necessary dependencies with the command
sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r).
- Change to the root user with the command
sudo su.
- Install the Guest Additions package with the command
./VBoxLinuxAdditions.run.
- Allow the installation to complete. You will see an error stating that the installer couldn’t find the X.Org or XFree86 Window System–that’s okay, because it doesn’t exist on this host.
Reboot your machine, and the Guest Additions will be working. You should see a bit of a performance increase, as well as the extra features (shared clipboard, shared folders, and more) awarded by this installation.
Fixing virtualbox shared folders
Run this command and exit, then log back in.
sudo usermod -aG vboxsf bloc67
Note that it must be done after guest additions is added and rebooted.
#ubuntuserver, #virtualbox