This package was approved by moderator mkevenaar on 6/16/2019. NOTE: This package should be installed inside your guest Windows VM and is useful for automating the building of Virtualbox VM's. It is not meant to be installed on the host. The Guest Additions are designed to be installed inside a virtual machine after the guest operating system has been installed.
Download & Attach VirtualBox Guest Additions. the appropriate version of VirtualBox Guest Additions. Thelatest would be at the time this article was written. Go ahead and attach the VirtualBox Guest Additions ISO as a device to the virtual machines storage.
This is basically emulating a CD being inserted into our virtual machine.Prepare CentOSA few commands need to be ran in order to prepare CentOS for the VirtualBox Guest Additions install. $ yum update$ yum install dkms gcc make kernel-devel bzip2 binutils patch libgomp glibc-headers glibc-devel kernel-headersAt this point, if we try to mount and install VirtualBox Guest Additions, we’ll run into an issue where the install script cannot find or recognize the kernel. Below is a workaround I found for this issue. Finding and Fixing Kernel Issue $ ls /usr/src/kernelsThe above will return what is in the /usr/src/kernels directory, which happens to be all of our kernel versions. Find the latest version, something like 3.10.0-514.16.1.el7.x8664, and truncate it to the 5XX number.
You’ll end up with 3.10.0-514.el7.x8664 in this case. Now install this kernel-devel before moving on.
$ yum install kernel-devel-3.10.0-514.el7.x8664 Mount and Install VirtualBox Guest AdditionsHere comes the easy part. Just mount the virtual cdrom and install the guest additions. $ mkdir -p /media/cdrom$ mount /dev/scd0 /media/cdrom$ sh /media/cdrom/VBoxLinuxAdditions.runThis should run properly. After reboot, all guest additions will be ready to use.
This includes the drivers, which is what we need to fix monitor resolutions. Manually Configure MonitorIf you reboot and find your resolution is still not fixed, then you may have to manually configure your monitor with Xorg. It’s not as hard as it sounds.
$ ls /usr/share/X11/xorg.conf.dThe above will show us if there are any configurations pertaining to monitors. If not, simply create a configuration file. $ vim /usr/share/X11/xorg.conf.d/10-monitor.confConfigure your monitor however you like. This is what I ended up with: Section 'Screen'Identifier'Default Screen'Device 'VirtualBox graphics card'Monitor 'Generic Monitor'DefaultDepth24SubSection 'Display'Depth 24Modes '1920x1080'EndSubSectionEndSectioFinally, after rebooting the virtual machine once again, the resolution should be fixed to whatever you set it as.
Guest Additions installs on the guest system and includes device drivers and system applications that optimize performance of the machine. Launch the guest OS in VirtualBox and click on Devices and Install Guest Additions.The AutoPlay window opens on the guest OS and click on the Run VBox Windows Additions executable.Click yes when the UAC screen comes up.Now simply follow through the installation wizard.During the installation wizard you can choose the Direct3D acceleration if you would like it. Remember this is going to take up more of your Host OS’s resources and is still experimental possibly making the guest unstable.When the installation starts you will need to allow the Sun display adapters to be installed.After everything has completed a reboot is required.Install Guest Additions for UbuntuNote: For this section we are using version 3.0.2 on Ubuntu 8.10 (32-bit) version.If you have Ubuntu running in a virtual machine installing the Guest Additions is easy as well.