You can also just delete the /lib/udev/rules.d/75-persistent-net-generator.rules from the template. That creates the /etc/udev/rules.d one. So with both of those gone, you'll get an eth0 even when your mac changes.
On Fri, Mar 1, 2013 at 11:15 AM, Patrick Miller <patrick.mil...@sungard.com> wrote: > the default build adds the mac address to a couple places. > > Here is a script I wrote to deal with it, Run before creating the template > > #!/bin/bash > ed /etc/udev/rules.d/70-persistent-net.rules <<__EOF__ > /eth0 > d > w > q > __EOF__ > > for i in /etc/sysconfig/network-scripts/ifcfg-eth* > do > ed ${i} <<_EOF_ > /HWADDR > d > w > q > _EOF_ > done > > > > Patrick > > > On Wed, Feb 27, 2013 at 12:51 AM, Prasanna Santhanam <t...@apache.org> wrote: >> On Tue, Feb 26, 2013 at 09:52:25PM +0530, Jason Pavao wrote: >>> Hey Folks, >>> Are there any wiki or documentation on what needs to be done to a >>> rhel5/6 instances before it can become a template? The symptoms i'm >>> experiencing right now are- when a instance gets created from template, >>> the vm comes up, but without eth0. I need to manually configure the host >>> via console and perform a reboot in order for the new instance to come >>> up with networking. Any advice would be very appreciated! >>> >> >> (moved discussion to -users) >> >> No specific wiki AFAIK, >> >> You could start from the ISO, create your instance and make a template >> of it. How did you go about creating the template? What is the >> BOOTPROTO in /etc/sysconfig/network-scripts/ifcfg-eth0? Can you turn >> off network-manager control for the ip and try again? >> >> Also note RHEL6(.3?) has the ifcfg-em1/em2 convention. >> >> -- >> Prasanna., >>