After cloning a working Debian virtual machine, the new system
would not bring up its Ethernet interface. This is because I checked
VirtualBox's dialog, "Reset MAC address for network card" and got a new
hardware Ethernet address.
Trying "ifup eth0" didn't work. I did an "ip addr" and saw that the
only configured interface was now called eth1.
This is simple to solve. Edit the file
/etc/udev/rules.d/70-persistent-net.rules and move the new MAC address
(like "00-0F-35-01..." and so on) from the eth1 line back to eth0,
erasing the previous address in the eth0 line. Then delete the
remainder of the eth1 line, save, and reboot.
You should now have your eth0 back.
Full instructions, particularly for "headless" installation, are here.
First we download the RPM for RedHat Enterprise Linux 5 (RHEL 5) which
is the equivalent to Centos from the virtualbox.org site
After downloading (and renaming the file to eliminate everything after
the .rpm) we install as follows but get an error:
# rpm -ivh VirtualBox-2.1.0_(version).rpm
No precompiled module for this kernel found! ...
Compilation of kernel module FAILED! ...
to find out why the kernel module does not compile.
Most probably the kernel sources are not found.
Install them and execute
To rectify this:
# yum install SDL kernel-devel kernel-headers
# export KERN_DIR
# /etc/init.d/vboxdrv setup
Then add users to the vboxusers group:
# /usr/sbin/usermod -a -G vboxusers yourusername
and you should be able to launch VirtualBox from the Applications /
System Tools menu.