I created an account just because I was having the same issues and I figured out some things along the way that might help others.
So to start, I am running a CentOS 7 VM in VirtualBox 4.xx and the video driver is recognized with my guest additions working almost
completely (auto-resize is still broken but I can live with this for now).
Getting Video Capbilities in a CentOS 7 VM (can be modified to apply to other Linux distributions also):
1. Download and Install a compatible version of VirtualBox Guest Additions
A. Download a version, newer than or made for the presently installed VirtualBox host program
Search through the VirtualBox download repository: https://download.virtualbox.org/virtualbox/
After selecting a folder, look for the "VBoxGuestAdditions x.xx.iso" file and download it
B. Install Guest Additions dependencies
Start the VM and mount the downloaded .iso file as a CD/DVD device in the VM Devices pane.
There are a few prerequisites for installing the Guest Additions that are available via the OS's native software repository program.
For RHEL-based Linux, use the following with "yum":
yum install epel-release
yum install gcc binutils make patch libgomp glibc-headers glibc-devel kernel kernel-devel kernel-headers
yum install dkms
Be sure to type "yes" for the install commands or use the "-y" option flag
C. Install Guest Additions
Open a terminal and use the "cd" command to navigate to the root of the CD/DVD folder.
Run the following command to start the installer:
sudo sh VBoxLinuxAdditions.run
If building the main Guest Additions kernel module fails, make sure that all the prerequisites have been installed correctly. Otherwise, reinstall them and attempt to run the installer again.
2. Obtaining, Compiling and Installing the "vboxvideo" driver
A. Downloading the source files for compilation
The file in the link below is a compressed tarball of the "vboxvideo" driver source files:
B. Compiling and installing the "vboxvideo" driver
Uncompress the downloaded files and navigate the terminal into the folder "xf86-video-vbox-..."
Run the following in the terminal:
sudo sh autogen.sh --prefix=/usr --with-xorg-module-dir=/usr/lib64/xorg/modules/drivers
sudo make && sudo make install
These commands will install two files "vboxvideo_drv.so" and "vboxvideo_drv.la" to your Xorg module directory.
Note: The kernel module "vboxvideo.ko" is installed with the Guest Additions and does not need to be adjusted for this.
3. Setting up the X Server Configuration
A. Creating/downloading the Xorg.conf file
The VirtualBox Guest Additions is setup to generate its own Xorg.conf file at the end of the install. This process is buggy in some versions. A link to a working Xorg.conf file is given below.
B. Inserting the "Xorg.conf" file for use
Once downloaded or copied, copy the file to the X11 folder.
sudo cp xorg.conf/etc/X11/
C. Closing Procedures
Restart the VM from inside the Guest OS and allow it to boot entirely. There should now be video and other guest capabilities.
To verify this, log into the OS and open the Settings menu to the Displays section.
The monitor label should read "VBX" and clicking on the label will allow adjustment of screen resolution.
I. "Black/Frozen Screen Upon Boot"
If the boot procedure hangs after completing the guide, switch to a different terminal window by pressing the "Alt" and "Fx" keys simultaneously where x is a number from 2-6 (i.e. "Alt-F2").
This will open a user login via a CLI interface.
Log into the terminal and use the following command to check the "Xorg" log:
sudo less /var/log/Xorg.0.log
Look for any entries regarding the "vboxvideo" device.
- For any "Not Found" issues:
Verify that the "vboxvideo_drv.so" file compiled in Step 2b is in the proper folder.
- For any "Incompatible Version" issues:
Verify that the proper "vboxvideo_drv.so" file compiled in Step 2b as this is meant to be compatible with the latest version of the X server available on CentOS 7. (1.19.3 - Ver(23))
The present version of the X Server is found using the command:
- For any issues regarding incorrect syntax in the "Xorg.conf":
Verify that the "Xorg.conf" file in Step 3A matches the one in the "/etc/X11/" folder on the Guest OS.
II. "Rationale behind the process"
As it turns out, the VirtualBox Guest Additions has driver files for the X Server up to X 1.18 Ver(20) included natively. Oddly enough, these files should be included in the latest version of the Guest Additions for the latest stable release of the VirtualBox host client.
These driver files were available from an a repository by OpenIndiana for a open-source version of their own Solaris-based OS, that was still usable in RHEL-based Linux. Included are some links of reference and further support.