Advertisements

Getting IP address after installing CentOS / Red Hat Linux in a virtual machine

I installed a VirtualBox/Parallels Desktop virtual machine with CentOS 6 and it didn’t automatically set up the network card with DHCP. I needed to add the following configuration to the file

root@centos:/etc/sysconfig/network-scripts # vi ifcfg-eth0
DEVICE=”eth0″
HWADDR=”00:1C:42:C0:FF:EE”
NM_CONTROLLED=”yes”
ONBOOT=”yes
BOOTPROTO=”dhcp”

Then restart the network service

root@centos:/etc/sysconfig/network-scripts # service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0… done.
[ OK ]

Advertisements
%d bloggers like this: