CentOS

Get NIC working in Hyper V for CentOS

Create a new VM in Hyper V – 2GB ram, 60GB disk, using CentOS-6.4x86_64-minimal.iso from Public Mirror list from www.centos.org
(If moving VM – you will need to modify MAC address in the /etc/sysconfig/network-scripts/ifcfg-eth0 file) and then:
After completing this now we need to reload udev configuration to reflect the changes:
start_udev
Create the /etc/sysconfig/network file. This may already exist. If not, enter the following:
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=COMPUTERNAME.DOMAIN
GATEWAY= (your gateway)
Create the network script for the adapter. You’ll need to know the MAC address of the network adapter – you can find this in the VM settings section.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
NM_CONTROLLED=yes
ONBOOT=yes
DHCP_HOSTNAME=$(hostname -s)
chmod 644 /etc/sysconfig/network
Restart the network service to bring up the adapter:
service network restart

Leave a Reply

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