VMware Cloning and Debian/Ubuntu udev Rules

When cloning Ubuntu 8.04 VMs under VMware, the /etc/udev/rules.d/70-persistent-net.rules file would get an entry for eth1 pointing at the newly-assigned NIC MAC address, leaving the original eth0 entry in place. This would cause networking to not work (i.e. “we’re having notwork problems haha”) and we’d have to manually edit this file, remove the old eth0 entry, and rename eth1 to eth0. PITA!

When we switched to Xen during our brief trial, this wasn’t necessary. We figured the Xen templating process had some smarts. Now that I’m playing with ESXi again, this issue reared its ugly head again. It turns out the file 75-persistent-net-generator.rules has an entry to exclude Xen NICs from getting an entry in the 70-persistent-net.rules file. Sweet! Adding the following line after ENV{MATCHADDR} is assigned causes the same effect:

ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", ENV{MATCHADDR}=""

It would be nice to use the same exclusion rule as the Xen entry, but substituting “vmware” for “xen” didn’t do the trick, and there’s little point wasting time trying to find out what the right string would be.

1 comment so far ↓

#1 Steve on 08.15.09 at 1:52 am

Easier yet is to simply delete the 70- and 75- files mentioned in the article.