Network not running in a CentOS VirtualBox machine

Be sure that your network options in VirtualBox are configured like this:

virtualbox-network

  • Attached to: Bridget Adapter
  • Name: (your network device)
  • Promiscuous Mode: Deny
  • Cable Connected: Check

Then inside the CentoOS virtual machine edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file so the eth0 device is loaded on boot and it’s fully controlled by the /etc/sysconfig/network-scripts/ scripts instead of the NetworkManager daemon:

ONBOOT=yes
NM_CONTROLLED=no

Then restart the network:

service network restart

Now you should have an eth0 adapter up and running:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:08:CA:1C:18:5A
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.224
          inet6 addr: fe80::20b:cdff:fe1c:185a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2341604 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2217673 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:293460932 (279.8 MiB)  TX bytes:1042006549 (993.7 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5019066 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5019066 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:816 (816.0 b)  TX bytes:816 (816.0 b)

You might also like

Install latest VirtualBox 4.3 in Ubuntu 12.04
Latest version of VirtualBox in 12.04 repositories is 4.1.* at the moment. If you want latest 4.3.* version...

TP-Link TL-WN725N version 2 in Raspbian 2014-01-07-wheezy-raspbian with kernel 3.10.25+
UPDATE: Read this post if you have another version of the kernel and want use a script to compile the...

TP-Link TL-WN725N version 2 in Raspberry Pi
Version 2 of TP-Link TL-WN725N driver doesn't come by default in Raspbian so it won't work by just plug-ining...

Split and join large files using cat, split and tar
I was going to store a CentOS DVD iso file into my external hard drive but the image was bigger than...

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.