You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Patrick Miller <pa...@sungard.com> on 2013/03/01 19:15:16 UTC

Re: instances from template not coming up with networking (eth0) on rhel5/6

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 <ts...@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.,
>

Re: instances from template not coming up with networking (eth0) on rhel5/6

Posted by Marcus Sorensen <sh...@gmail.com>.
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
<pa...@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 <ts...@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.,
>>

Re: instances from template not coming up with networking (eth0) on rhel5/6

Posted by Jason Pavao <ja...@oracle.com>.
Thanks I'll add this and see if it helps!

Since I work templates a bunch, I'm interested in helping with 
documentation on the guest side/collect handy scripts, etc. Let me know 
the best way to get my feet wet.

Happy Friday!
-jason

On 3/1/2013 10:15 AM, Patrick Miller 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<ts...@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.,
>>

-- 
Thanks.
-Jason


Re: instances from template not coming up with networking (eth0) on rhel5/6

Posted by Marcus Sorensen <sh...@gmail.com>.
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
<pa...@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 <ts...@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.,
>>