Linux – How to configure networking on CentOS 6 running on hyper-v

centoshyper-vlinuxvirtualization

I'm not using legacy adapters, and i've installed Linux Integration Components 3.2.

THe problem i'm facing is that the command 'setup' or 'system-config-network' doesn't list any network interfaces. If i run ifconfig -a i can see both the network cards i've attached. By setting a ip using ifconfig i can get network connectivity. The problem is that it's not persistent after a reboot.

I'm a 100% centos newbie, but I figure it has something to do with that the centos installer couldn't see the NICs on install.

How can I fix this?

Best Answer

Have a look in /etc/sysconfig/network-scripts/ifcfg-eth0 there should be a line that says ONBOOT=yes which causes eth0 to be configured when the system starts.

Related Topic