I just set up a 1GB drive on my workstation so that I can run some VM’s locally for work.  For a simple hypervisor to run Linux virtual machines on my Windows box, I use Oracle’s Virtualbox software.  It works well, and is stupid simple to configure and build VM’s.

This evening, I downloaded a CentOS 6.2 (minimal) CD ISO image and installed it in a VM.  When I logged in, I was surprised to see that the network connection wasn’t coming up, even though the NIC drivers were correctly installed.

I brute forced my connection using ifconfig, route, and editing /etc/resolv.conf and installed a few things that I thought might help, including the system-config-network-tui tool that I’m used to using on CentOS and Red Hat.  After all that, still no joy!

At this point, I resorted to Google.  A quick search and I found that there had been a change in the default network configuration on CentOS 6.  This change modified the behavior such that the network connections aren’t brought up on boot like they had been in the past.

Here is the solution:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and make a couple of quick changes.

First, set ONBOOT=no to ONBOOT=yes.

Second, set BOOTPROTO=dhcp if it isn’t already.  On my system, it was set to “none”.

Restart the networking services, and it eth0 should be up and running