CentOS 7: Virtual Box VM

Folks, this is how it’s done.

Oracle may not be our favorite company, but this is one thing you will not want to miss: Oracle’s Virtual Box VM. It’s free.

You’ll find the user manual is quite in-depth. Here are the installation instructions. Keep a link to the manual itself in case you need some help on things. What follows is a quick-n-dirty HOWTO.

You will need to install the kernel-devel package and all the dependencies. You’ll also need the dkms from EPEL, so be sure to enable that respository. What dkms does is allow kernel modules to follow updates to newer kernels.

Download the correct version of Virtual Box; it will list CentOS 7 with a link to the RPM. You’ll need your root credentials to install using Yum on the CLI. What happens is that the package builds itself on your machine and creates several kernel modules. It will take a good long while as the system is quite busy in the background.

I got errors from SELinux about attempts by ldconfig to write to some directory. You’ll have them show up in little GUI popups and on the console after it’s installed you’ll see this:

Trying to register the VirtualBox kernel modules using DKMSldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
ldconfig exited ungracefully
ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
ldconfig exited ungracefully
ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
ldconfig exited ungracefully

So far as I can tell, it has no effect on the outcomes, so just be aware that this represents how strongly SELinux protects you from unwanted changes to your system.

Also notice the message about adding your user account to the vboxusers group. While still logged in as root, simply edit the file /etc/group. Scroll down to the last item on the list, which should be vboxusers and simply add your user account name at the end of the line.

Launch from the main menu: System > Oracle VM Virtual Box. Upon first running the thing you’ll discover this is a very intelligent tool and much easier to use than Qemu.

You create the machine first and get it running before you install. I didn’t think 192MB was enough RAM for Windows XP. Depending on your system, you may not be able to give your VM multiple cores on the CPU. If you can’t, you’ll get errors about not having AMD-V enabled in the BIOS. My Win8 laptop was like that. However, I was able to link the machine to my own home folders right from the start; I selected the automount option and browsed to a Projects folder where I need to use MS Office. You really need to take your time and explore the various options in this manager window.

The display is considerably less laggy than Qemu. Once you install the Guest Additions, it becomes even less so. You can fix a lot of niggling issues like display, making your VM respond automatically to window resizing and such. Under the VM menu, see “Devices” and select the last item at the bottom to automatically mount the virtual ISO image and get those extra drivers so that everything can be smooth and unified in use.

A very handy feature is the row of icons across the lower right side of the window when the VM is running. You can connect and disconnect from the host USB, CD/DVD drives, etc. with ease. From the menu, you can elect to connect or disconnect things like the network connection. So you can, for example, keep your vulnerable XP VM from the Internet.

It’s pretty easy to export your VMs and reimport them on other machines running Virtual Box.

This entry was posted in computers and tagged , , , , , . Bookmark the permalink.