Breaking News

Enable networking in RHEL 6 on Microsoft Hyper-V


Goal: Enable networking in RHEL 6 on Microsoft Hyper-V

After installing RHEL 6 in Hyper-v

Open Hyper-V console and Right click on the newly created RHEL VM

Click Start to boot the machine and click connect

New Window will pop up and shows the progress of RHEL boot

login to root user or any sudo privileged user.

In the windows machine(Hyper V), download Linux Integration Services v3.4 for Hyper-V from http://www.microsoft.com/en-us/download/details.aspx?id=34603

and in the VM window, click on mount-> Disk-> ISO and select the ISO file.

mount /dev/cdrom /media

In the linux console, execute
cd /media/RHEL63
./install.sh  to install the Linux Integration Services components of HYPERV

shut down the machine(VM).

Open the settings for the current RHEL VM machine.
Navigate to Network adaptors -> Advanced and select -> Static

and start the machine and login as root user

cd /etc/sysconfig/network-scripts
nano ifcfg-eth0

and keep the below contents

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=10.0.1.27
USERCTL=no
NAME=eth0

save and exit

Edit /etc/sysconfig/network by
nano /etc/sysconfig/network

and keep the below contents

NETWORKING=yesIf
HOSTNAME=testhostname
GATEWAY=10.0.1.1
save and exit

execute ifup etho

if you execute ifconfig, you should get etho



Troubleshooting: while executing ifup etho, if you get "Device eth0 does not seem to be present, delaying initialization"
follow the below steps

rm /etc/udev/rules.d/70-persistent-net.rules
and reboot. If it doesn't work,  cat /etc/udev/rules.d/70-persistent-net.rules
and get the ATTR  for Name "eth0". If Name "eth0" is not present, change the Name in ifcfg-eth0 of network-scripts and
cd /etc/sysconfig/network-scripts
nano ifcfg-eth0

and add the HWADDR=00:00:00:00:00:00(captured from ATTR from ifcfg-eth0)

save and exit.

Now restart the network service.
service network restart

If you check now ifconfig, you will get eth0

No comments