Wednesday, July 22, 2015

VBox Images with Same IP

This is happening because of same Mac Address that both the VBox images are using. When both the images are connected to the network, both are using one IP and thus all the request will be sent to one machine.
I have tried to refresh the MAC address of all three network adaptors (Bridged Adaptor, NAT, Host Only Adaptor) and restarted the VBox Image. But, unfortunately it stopped connecting to network and showing only loop back address for ifconfig command.
I have tried to start the network and got the below error,

a.      /etc/init.d/network restart
b.      Got the exception as “Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization” [FAILED}

After a lot of trial and error, I managed to sort out the issue and I have tested in two VBox images and it is working fine.
To avoid this issue, we need to follow the below steps.
1.       If you are connected with Bridged Adapter, NAT and Host-Only Adapter etc., please disable all the network adaptors except Bridged Adaptor.
VBox Image should be shutdown to do this à Settings àNetwork.
2.       Click on ‘Advanced’ in the Adaptor-0 (Bridged Adaptor) and click on the refresh button of MAC address. Note down this MAC Address in a note pad.
3.      Start the VM and login with root user.
4.      Remove the /etc/udev/rules.d/70-persistent-net.rules
a.      cd /etc/udev/rules.d/
b.      rm -rf 70-persistent-net.rules
5.      Manuall
a.      cd /etc/sysconfig/network-scripts/
b.      vi
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
HWADDR=08:00:27:bf:30:a7
USERCTL=no
PEERDNS=yes
IPV6INIT=no
c.       Change the HWADDR to the new One
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
HWADDR=08:00:27:bf:94:a6
USERCTL=no
PEERDNS=yes
IPV6INIT=no
6.      Shutdown the VBox Image
a.      shutdown –h now
7.      Restart the Machine
8.      Start the VBox image with root user
9.      Check the IP address
a.      ifconfig
b.      We can see the eth0 are initiated and IPs are assigned.


No comments:

Post a Comment