- Download the latest available VirtualBox binaries for our platform from, https://www.virtualbox.org/wiki/Downloads and go ahead with the installation. The installation is pretty straight forward, just double click the binary file and follow the wizard. At the time of writing this article the VirtualBox version was 4.3.6
- Download the "CentOS-6.5-x86_64-minimal.iso" from the CentOS website. We can download it from the nearest mirror to our location.
- Create virtual machine with type Linux and version Red Hat (64 bit). All the default installation parameters should be fine like memory 512M and hard disk 8G as we are going to do the minimal installation. Note: I am assuming we have x86_64 supported hardware and downloaded 64 bit ISO file.
- Once the virtual machine is created then configure the following,
- Click on Storage and under IDE Controller select Empty CD/DVD Drive. On the right side under the Attributes browse the path and select the ISO file we downloaded in step #2.
- Click on Network and change the Attached to to Bridge Adapter and Adapter Type to Paravirtualized Network (virtio-net).
- Also, I prefer to disable any unwanted component like Audio, Serial Ports and USB.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Change the parameter ONBOOT=no to ONBOOT=yes and save the file wq! and now to restart the network service,
# service network restart
# yum -y upgrade
And reboot the system,
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# vi /etc/yum.repos.d/epel.repo
Under [epel] change the line enabled=1 to enabled=0 and save the file wq!
# yum -y install kernel-devel gcc make perl dkms --enablerepo epel
# mount /dev/cdrom /mnt
The output will be,
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.6 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.6 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module [ OK ]
Building the shared folder support module [ OK ]
Building the OpenGL support module [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions [ OK ]
Installing the Window System drivers [FAILED]
(Could not find the X.Org or XFree86 Window System.)
The output shows two failures, the second one is for Window System drivers which we don't care because this is CentOS system not Windows but first one failed to build the OpenGL support module.
OpenGL (Open Graphics Library) is a cross-language, multi-platform application programming interface (API) for rendering 2D and 3D computer graphics. The API is typically used to interact with a Graphics processing unit (GPU), to achieve hardware-accelerated rendering. - Wikipedia
If we do tail on the log file /var/log/vboxadd-install.log and look near the bottom then we will notice there are four files that VirtualBox Guest Additions couldn't find,
include/drm/drmP.h:76:21: error: drm/drm.h: No such file or directory
include/drm/drmP.h:77:27: error: drm/drm_sarea.h: No such file or directory
include/drm/drm_crtc.h:35:26: error: drm/drm_mode.h: No such file or directory
include/drm/drm_crtc.h:37:28: error: drm/drm_fourcc.h: No such file or directory
But if we check what provide these files then the packages are already installed on the system,
# yum whatprovides "*drm/drm.h"
Now let's check if these files are present in kernel source,
# ls /usr/src/kernels/$(uname -r)/include/drm | grep -E "^drm_fourcc.h$|^drm.h$|^drm_mode.h$|^drm_sarea.h$"
If this does not return any output then it mean the files are not present in the kernel source and we need to create symbolic links manually,
# cd /usr/src/kernels/$(uname -r)/include/drm
# ln -s /usr/include/drm/drm.h drm.h
# ln -s /usr/include/drm/drm_sarea.h drm_sarea.h
# ln -s /usr/include/drm/drm_mode.h drm_mode.h
# ln -s /usr/include/drm/drm_fourcc.h drm_fourcc.h
Hurry!! Happy days, everything is OK this time.
Starting udev: piix4_smbus 0000:00:07.0: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr
This is an error caused by VM having no smbus but operating system always try to load the module. It doesn't affect anything and can be safely ignored but is a bit annoying so to fix this let's check if the module is being loaded,
# lsmod | grep -i piix4
If yes, then go ahead and blacklist the module,
# echo "# Blacklist the smbus i2c_piix4 module" >> /etc/modprobe.d/blacklist.conf
# echo "blacklist i2c_piix4" >> /etc/modprobe.d/blacklist.conf
# yum -y install wget man vim-enhance
Now we are good to power off the machine, just right click and clone to spin up new virtual machine. If we clone the machine there are two recurring tasks that we need to perform every time. First, rename the network interface eth1 back to eth0 which I have already documented but those are manual steps. Stay tuned for my upcoming posts for scripted way to fix the issue. Second, update the host name in /etc/hosts and /etc/sysconfig/network files. I couldn't find a way to get the VM name from CentOS guest but I am checking at the VirtualBox forum if this is even possible, otherwise stay tuned for my next article on scripted (less manual) way to update the host name.
- Collect Centrify DirectControl Debug Log
- Python Script: Check Ping Status and Lookup Hostname from IP List
- adclient: DEBUG util.except (cims::RPC) : NetLogon::authenticate failed: Buffer Overflow
- Setup Net-SNMP v3 on VMware ESX 4.0
This post appeared on the softlexicon.com by Sumit Goel. Copyright © 2012–2014 – softlexicon.com and Sumit Goel. All rights reserved. Not to be reproduced for commercial purposes without written permission.