Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Ubuntu 12.10 on which i installed virtual box on which I setup centos 6.4 i386. On Ubuntu I have: 3.5.0-17-generic kernal running.

On virtual box I install centos 6.4 and everything works fine, however when i boot into VM machine, there is only on loopback interface. Nothing else. I tried to manually add ifcfg-eth0 file but nothing happens. On VM settings i have added NAT and HostOnly interfaces but whenever I boot into centos there is just lo interface. What should I do?

share|improve this question
add comment

3 Answers

You need to enable networking during installation. You can do it post install as well. This is a change in the CentOS installation in the 6.x versions which throws a lot of people off, including myself.

Starting with CentOS 6.x you can either opt to have NetworkManager manage your network setups or still do it the old fashion way and set them up manually using /etc/sysconfig/network-scripts/ifcfg-eth0 types of files. Given this is a VM I'd recommend using NetworkManager.

To invoke the connection editor tool do the following:

$ nm-connection-editor

You'll be presented with a GUI like this:

                         ss of conn. editor

From this GUI you'll need to edit the eth0 setup like so:

                         ss of nm #1

                         ss of nm #2

                         ss of nm #3

share|improve this answer
3  
Centos 6.4 "nm-connection-editor not found" ... no GUI running. Headless server. no joy. :( –  Mojo Jul 22 '13 at 19:10
add comment

I think it's probably the network-setting that throws it. I've found mine work best with "Bridged Adapter", as you then use the host's network card directly. It'll also allow the virtual-computer to use DHCP to get it's own internal-IP from your router.

NAT is a bit strange, as you use only one IP-address (the same as the host's?) and instead relay on translation of ports - thus it's not really a separate IP for the virtual-computer. HostOnly I think only allows the virtual-computer to make "local network" with your host - ie. no external Internet. And that pretty much leaves you with just the loop-back device.

share|improve this answer
add comment

have a look at the NIC-configurationfiles /etc/sysconfig/networking/devices/ifcfg-ethX and check if the parameter ONBOOT exists. If not – add it.

grep "ONBOOT=yes" /etc/sysconfig/networking/devices/*
/etc/sysconfig/networking/devices/ifcfg-eth0:ONBOOT=yes
/etc/sysconfig/networking/devices/ifcfg-eth1:ONBOOT=yes

Reboot or /etc/init.d/network restart after the change should bring your interface up.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.