Fixing eth0 MAC Address After VMware Clone or Restore

If you have been around VMWare long, then you have cloned, restored or otherwise copied a virtual machine.  When the copied virtual machine is created, it is given a different MAC address, which causes VMWare to see its network adapter as eth1.  This will result in eth1 being assigned either a DHCP address at boot if available or to use a self-assigned address if not.  This article shows how to fix this problem using Linux, but whatever operating system you are using, the steps are similar.

Bringing Up Interface Eth0:  Error: No Suitable Device Found: No Device Found for Connection ‘System Eth0’

The problem begins when, after cloning a virtual machine, the eth0 device cannot be found by the kernel.  You will normally notice an error during boot similar to:  “Bringing up Interface eth0:  Error:  No suitable device found:  no device found for connection ‘System eth0’.

Bringing up Interface eth0:  Error:  No suitable device found: no device found for connection 'System eth0'

Bringing up Interface eth0: Error: No suitable device found: no device found for connection ‘System eth0’

As I mentioned above, this is caused when the new virtual machine is created.  VMware has assigned an ethernet adapter to the virtual machine with a different MAC address than what the source VM was using.

This issue is fairly simple to resolve.

Find the New MAC Address for Your Network Adapter

There are many ways to find the new MAC address assigned to your network adapter.  Since this is VMWare, you can simply edit your virtual machine in VMWare and look at the MAC Address assigned to “Network adapter 1”.  Or even simpler is to use ifcfg to list the adapters on the machine.  In the example below, you can see that this example machine, (a clone of my quickbook server) couldn’t find eth0 by MAC address and assumed it was eth1 and then picked up a DHCP address instead of using the configured address for eth0:

ifconfig shows eth1 instead of eth0

ifconfig shows eth1 instead of eth0

Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 File

 

Edit the MAC address in /etc/sysconfig/network-scripts/ifcfg-eth0

Edit the MAC address in /etc/sysconfig/network-scripts/ifcfg-eth0

With this information, grab the HWaddr, we will then edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file and change the HWADDR parameter to the MAC address that you found in one of the 2 steps above.

Use a Unique IP Address

Since this is a clone of a current server, you will want to be sure, since you are already in this file that the IP Address assigned to this adapter is unique on your network.  If the source virtual machine that you cloned this machine from, you will want to resolve the conflict before continuing.

Restart the Network Service

After changing the MAC address, you will need to either reboot the operating system or restart the network adapter service.  In my case, as I was on the console of this CentOS 6 machine, I simply restarted the network service:

# service network restart

which brought up eth0 now using the assigned IP Address.  At this point, your eth0 should now be up and using the desired IP Address.

 

 

The following two tabs change content below.
Jeff has 20 years of professional IT experience, having done nearly everything in his roles of IT consultant, Systems Integrator, Systems Engineer, CNOC Engineer, Systems Administrator, Network Systems Administrator, and IT Director. If there is one thing he knows for sure, it is that there is always a simple answer to every IT problem and that downtime begins with complexity. Seasoned IT professional by day, Jeff hopes to help other IT professionals by blogging about his experiences at night on his blog: http://uptimemadeeasy.com. You can find Jeff on or LinkedIn at: LinkedIn or Twitter at: Twitter

Latest posts by Jeff Staten (see all)

10 comments for “Fixing eth0 MAC Address After VMware Clone or Restore

  1. kalpesh
    April 22, 2014 at 5:15 pm

    i tried doing the above… but it did not work… 🙁
    I checked the output of ethtool eth0
    It shows link is not detected…
    Any help would be appreciated…. 🙂

  2. April 23, 2014 at 8:11 am

    Kalpesh,

    Do you notice if eth1 is enabled and available. What often happens in these cases is that it thinks eth0 is a new device and adds it as eth1.

  3. Sri
    August 20, 2014 at 9:53 am

    Aaah! Very trivial thing that went unnoticed. Thanks Jeff! 🙂

  4. eMmAK
    July 20, 2016 at 3:38 pm

    LIFE SAVING!!

  5. Ganesh
    July 30, 2016 at 11:33 pm

    Thanks Jeff for this article.

  6. Ani
    September 24, 2016 at 10:59 am

    we did not have MAC parameter inside ifcfg-ether file, but we updated device name and it fixed the issue as well. Thanks

  7. February 18, 2017 at 3:01 am

    thanks, saved my day

  8. sandy
    April 20, 2017 at 12:22 pm

    Works like a charm… thanks

  9. meital
    September 6, 2017 at 4:01 am

    Thanks, it works!

  10. pritam
    October 6, 2017 at 6:57 am

    Thank you so much!! worked perfectly!

Leave a Reply

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