Ubuntu Cloning – Mac Address Change Mayhem.

by bunchc on March 10, 2009

Apparently networking in Ubuntu goes funny when you change it’s Mac Address, and picks up the changed MAC as a new NIC, and assigns it the next number sequentially. While you can get around this by statically setting the MAC address, you generally want to avoid that. Having duplicate MAC addresses is a “Bad Idea”

Instead, what you want to do, either prior to cloning, or after the fact (prior if you’re making more than one copy), is to edit the “/etc/udev/rules.d/70-persistent-net.rules” file, and remove the eth0 entry. Lets take a look:

# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0×1022:0×2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:02:51:cf", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

An ugly beast of a file but that last line is the one that needs deleting. Another method of doing this, is to edit the ‘persistent-net-generator.rules’ file to include something similar to:

# ignore VMware virtual interfaces
ATTR{address}=="00:0c:29:*", GOTO="persistent_net_generator_end"

This ought to take care of it on an ongoing basis, and eliminates the need for the first line.

This came up in the VMware Communities this weekend.

  • Pingback: The case of the disappearing eth0 @ BVLog

  • Pingback: — Somewhere out there!

  • http://charlesleaver.com/ chukaman

    Perhaps this is going to be an enormous fail and I'm going to embarras myself on VMware forums around the world, but my ESXs have OUI's of 00-50-56-xx-yy-zz, which a search at ieee.org confirms is correct, so the above would not apply to me. Obviously I realise that, but somebody copying and pasting and not thinking might end up saying it doesn't work for them.

    00-50-56 (hex) VMware, Inc.
    005056 (base 16) VMware, Inc.
    3401 Hillview Avenue
    PALO ALTO CA 94304
    UNITED STATES

  • http://professionalvmware.com professionalvmware

    A search for the above also returns VMware. It should be noted that this should be tailored to your environment.

    Here are the results of your search through the public section of the IEEE Standards OUI database report for 00-0c-29:

    00-0C-29 (hex) VMware, Inc.
    000C29 (base 16) VMware, Inc.
    3401 Hillview Avenue
    Palo Alto CA 94304
    UNITED STATES

  • Pingback: The Return of Virtualization Short Takes - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers

  • http://bwgsolutions.com/ business ideas

    hi
    i read this article.it is relay nice but please tell Can I make a clone of my modified Ubuntu Linux distro?

  • http://professionalvmware.com professionalvmware

    You should be able too, yes. If you need live cloning, make sure you have
    the VMware tools installed.

  • http://professionalvmware.com professionalvmware

    s/too/to dang word use.

  • Pingback: Professional VMware » Blog Archive » More MAC Address Mayhem – SLES Edition

  • http://www.universitysda.com bible study

    excellent post, I'll have to check back more often, thanks!

  • http://professionalvmware.com professionalvmware

    No problem!

  • http://your-review.com/internettv/ faber112

    Finally I have fount this! I am using vmware for a while now but i didnt use ubuntu with it because of the funny problem when you change mac adresses. hopefully this is going to work now!

  • http://professionalvmware.com professionalvmware

    If not, let me know and we can dig a bit deeper.

    -C

  • http://professionalvmware.com professionalvmware

    If not, let me know and we can dig a bit deeper.

    -C

  • http://vibram4u.com/ moncler outlet store

    Hhe article’s content rich variety which make us move for our mood after reading this article. surprise, here wslmart.net you will find what you want! Recently, I found some wedsites which commodity is colorful of fashion. Such as xxxxxxxx that worth you to see. Believe me these websites won’t let you down.

  • http://www.air-jordan-21.net air jordan 21

    Well , the view of the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good ugg boots information we can learn in this forum!

  • http://www.cheapbootsforsale.us ugg boots

    Well , the view of the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good ugg boots information we can learn in this forum!

Previous post:

Next post: