Cloning machines in VMWare is really straightforward thing. However once you do clone a machine, you’ll be left with new MAC addresses for the network cards. In a typical scenario the cloned RHEL or CentOS machine will boot up without the local network interface. You’ll typically see the following during boot.
Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring.
The reason for this is that
/etc/sysconfig/network-scripts/ifcfg-eth0
contains a variable called “HWADDR=”. Do the following to add the appropriate MAC address and restore networking functionality.
- As the root user (or a user with appropriate permissions)
- Type “ifconfig -a”
- From the displayed information, find eth0 (this is the default first Ethernet adapter)
- Locate the number next to the HWaddr. This is your MAC address
A typical output would be as follows.
eth0 Link encap:Ethernet HWaddr 00:1B:21:1F:66:88
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
... the additional output has been removed...
Now you edit
/etc/sysconfig/network-scripts/ifcfg-eth0
and modify the “HWADDR=” variable to include your MAC address. E.g.
HWADDR=00:1B:21:1F:66:88
Save the file. At this point you run
# service network restart
as root from the command prompt. You’ve now restored networking.
// CrashMAG