Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using CentOS 6.2 with VMware. I often have to clone my systems. Every time I clone it is adds a new rule to 70-persistent-net.rules file like so.

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:0c:f1:5e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

I never have more than one interface in my systems so this gets really annoying. I know there is way to change the rule to be PCI bus dependent and not MAC dependent, because I have done that already once but I cannot find anywhere on how to do it.

I understand the reasons behind this implementation of udev rules. It makes perfect sense on physical systems but on VMs it becomes an annoyance. Please help.

share|improve this question
This site is dead. No one to answer the question. I would imagine this would a piece of cake for any good "linux guru". – xsaero00 Jan 17 '12 at 22:16
2  
If you want immediate support, paying someone to help gets you much better mileage than insulting the people who are helping you FOR FREE. – MikeyB May 5 '12 at 22:42
I was not insulting you or anyone else. I was just stating the fact that after a week this simple question did not get a single response. I am sorry you are so sensitive. – xsaero00 Jun 11 '12 at 18:36

3 Answers

up vote 2 down vote accepted

This should be enough for what you want:

DRIVERS=="?*", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
share|improve this answer
This worked. I tried to match it on PCI bus ID but that did not help. Hovewer I do not think this solution will work if I add second network interface. – xsaero00 Jun 13 '12 at 23:39
Found more information on how to do it here linuxfromscratch.org/blfs/view/development/chapter07/… – xsaero00 Jun 13 '12 at 23:56
I ended up deleting all other rules in 70-persistent-net.rules file and having just one like so ACTION=="add", SUBSYSTEM=="net", BUS=="pci", KERNELS=="0000:02:00.0", NAME="eth0" – xsaero00 Jun 13 '12 at 23:59

Identify the device by PCI address instead. Something like:

SUBSYSTEM=="net", BUS=="PCI", ID=="0000:04:00.0", ...
share|improve this answer

I rarely clone Linux systems with VMWare. It's easy enough to rebuild (kickstart + Puppet/CFEngine), that it almost faster to reprovision a system than to clone.

But how are you cloning? Are you doing it from a VM template? Typically, if cloning from a template, I haven't had any NIC-related issues.

share|improve this answer
Yeas I am using VM template. When cloning CentOS 5 I had no problems. CentOS 6 is different. – xsaero00 Jun 11 '12 at 18:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.