udev and persistant rules

I use kvm a lot,every day I clone some kvm machine for purposes of testing of various things I work on.For that purpose I installed so-called “golden samples” of RHEL 5 / RHEL 6 and use these “golden samples” I clone my new RHEL 5 / RHEL 6 virtual machine.This works fine for me,except one small annoyance.If I clone new virtual machine then “virt-clone” will create new eth0 device ( for eg. eth1 ) and assign it an random MAC address.This is not such big issue as well,but if I want to have on every new cloned machine my eth0 device ( same as on “golden sample” ) then this would be issue.
To fix this,you will need to do below on “golden sample”

remove “persistent net” rule file from /etc/udev/rules.d/70-persistent-net.rules
remove HWADDR line from /etc/sysconfig/network-scripts/ifcfg-eth0

Next time you clone “golden sample” it will got its eth0 device

Advertisements

#udev