New VM – Centos no internet?

So you have finally completed setting up your first vm and installed Centos 6 (minimal version) but having problem with internet connection?

We’ll you might hit the same issue as mine. not to worry as you just need to do extra configuration for the network.

Steps:

1. Open this file with your favorite editor for my case im using vim editor

vi /etc/sysconfig/network-scripts/ifcfg-eth0

2. Change the values

ONBOOT=no
NM_CONTROLLED=yes

to

ONBOOT=yes
NM_CONTROLLED=no

Note: some distribution has quote, just follow the quote if yours got.

3. Save and exit the editor

4. restart the network service

/etc/init.d/network restart

5. ping any website and see if internet works.

ping google.com

Leave a Reply

Your email address will not be published. Required fields are marked *