VirtualBox Guest Additions is a software package for VirtualBox that expands its abilities and provides a more seamless user experience. Adding Guest Additions is not required but allows VMs to run in full screen mode without black bars and also provides seamless mouse integration so users don't have to hit their host key to release their mouse pointers. In this video, install an updated kernel, the kernel source and software development tools. Then, insert the Guest Additions CD and the installer compiles a new kernel module.
- [Instructor] VirtualBox Guest Additions are pieces of software installed in the guest operating system that gives the OS a direct communication path to VirtualBox. This allows the guest to take advantage of faster drivers, better screen resolutions, and better integration between the guest and the host. I highly recommend installing Guest Additions as it makes the virtual experience smoother. When running a VM, you may notice if you press Host + F to go into full screen mode, that CentOS doesn't fill the entire screen. Installing Guest Additions will fix this, among other things.
There are a few prerequisites for installing VirtualBox Guest Additions. All CentOS system updates have to be done and the VM has to be rebooted to ensure CentOS is using the latest kernel. Also, the network needs to be functional. To update the system software, open a terminal in your VM by selecting Applications, Favorites, and Terminal. I'm gonna make mine fullsceen and I'm gonna bump my font size. Now type in sudo yum -y update and hit Enter and then type in your password.
There's a chance that the yum database may be currently locked. If so, you need to kill the other yum process, which is listed in the error output. In this case, you'd type in sudo kill -9 and the process ID listed in the error output and then you'd run the yum update command again. In my case, the update is going well and I only have one package to update, which is the kernel. When the updates are done, reboot by typing in sudo reboot and hit Enter. Type in your password.
Once the VM has rebooted, log back in and open a terminal. Now let's install the development tools software group by typing sudo yum group install -y - -setopt=group_command=objects "Development Tools" and hit Enter.
Type in your password and hit Enter again. Due to a change in the way software groups are handled in CentOS 7, we need to add the --setup option listed above. In your case, it may work without it. We need the double quotes so yum knows we're installing one software group called Development Tools. When that's done, we'll need to install the kernel source. Type in sudo yum install -y kernel-devel and hit Enter.
After yum is finished installing the kernel source, we can close the terminal window. Now let's go to the virtual machine menus. If you're in fullscreen mode like I am, then you'll need to press the Host key to release your mouse pointer and then hover it over the bottom of the screen. The menu bar should show up. If you're not in fullscreen mode, you'll need to press your Host key and then click on the menu at the top of the window. Select Devices and Insert Guest Additions CD Image. Once the dialog pops up, click on Run and type in your password.
Once we've authenticated, it will start installing Guest Additions. The installer is taking the development tool software and is compiling a module for the Linux kernel and then installing it, which should finish in a few moments. Now that the Guest Additions software is installed, reboot your VM again by going to the top right-hand menu and selecting the power button and then click Restart. Once it has rebooted, log in and you should be able to go into actual fullscreen mode by pressing Host key + F. If your VM rebooted okay and your Guest Additions installed successfully, you'll want to create a new snapshot.
With our VM running, press Host + T to create a new snapshot. We'll call this snapshot Guest Additions. And hit Enter. You will want to follow the same procedure for each of your virtual machines.
Note: This course also helps you study to pass the Red Hat Certified Engineer (RHCE) exam—the benchmark certification for Red Hat Enterprise Linux.
- Installing DNS clients
- Using host, nslookup, and dig
- Name resolution
- DNS roles
- Configuring DNS
- Apache web server features
- Apache commands and access control
- Configure Apache and virtual hosts
- Securing virtual hosts with SSL and TLS
- Running CGI scripts in Apache
- Configuring NGINX server blocks