You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Indra Pramana <in...@sg.or.id> on 2013/08/23 19:21:47 UTC

Problem creating VM using CentOS 6.4 template

Dear all,

I am using CloudStack 4.1.0 with KVM hypervisors. I tried to create CentOS
6.4 template by installing a CentOS 6.4 VM from ISO, and then save the root
disk as a KVM template.

However, when I tried to create a VM using the template, while the server
was created, the network is not working because the new VM activates
different ethernet port (eth1 instead of eth0) while on the original VM,
only eth0 was configured.

If I tried to configure the network settings (DHCP) on both eth0 and eth1
and then recreate the template, the new VM based on the template will
activate eth2 instead.

Anyone having similar problem and have found a solution to this problem? I
only have this issue with CentOS 6.4, I don't have any issues using CentOS
5.9 or Ubuntu 13.04 / 12.04.2.

Looking forward to your reply, thank you.

Cheers.

Re: Problem creating VM using CentOS 6.4 template

Posted by "Teipel, Bjoern" <bj...@internetbrands.com>.
Delete the 70 rule, before finishing the template, in the /etc/udev/rules.d which persists the MAC address to eth0 and so on. 
That's actually quite common and cloud stack unrelated. (Please verify path, I'm on the road)

Bjoern 

On Aug 23, 2013, at 10:22 AM, "Indra Pramana" <in...@sg.or.id> wrote:

> Dear all,
> 
> I am using CloudStack 4.1.0 with KVM hypervisors. I tried to create CentOS
> 6.4 template by installing a CentOS 6.4 VM from ISO, and then save the root
> disk as a KVM template.
> 
> However, when I tried to create a VM using the template, while the server
> was created, the network is not working because the new VM activates
> different ethernet port (eth1 instead of eth0) while on the original VM,
> only eth0 was configured.
> 
> If I tried to configure the network settings (DHCP) on both eth0 and eth1
> and then recreate the template, the new VM based on the template will
> activate eth2 instead.
> 
> Anyone having similar problem and have found a solution to this problem? I
> only have this issue with CentOS 6.4, I don't have any issues using CentOS
> 5.9 or Ubuntu 13.04 / 12.04.2.
> 
> Looking forward to your reply, thank you.
> 
> Cheers.

Re: Problem creating VM using CentOS 6.4 template

Posted by Indra Pramana <in...@sg.or.id>.
Dear Bjoern, Shankerbalan, Marty and all,

Thanks! Managed to create a working template by:

(1) Commented out the line on /etc/udev/rules.d/70-persistent-net.rules

# PCI device 0x8086:0x100e (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="06:12:f8:01:12:5f", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth0"

(2) Delete the line containing the MAC address on
/etc/sysconfig/network-scripts/ifcfg-eth0.

Thank you for your help!

Cheers.



On Sat, Aug 24, 2013 at 2:03 AM, Marty Sweet <ms...@gmail.com> wrote:

> Hi Indra,
>
> I pushed some documentation for this into 4.2 last night. I have attached
> a snippet of the PDF.
>
> Marty
>
>
> On Fri, Aug 23, 2013 at 6:47 PM, Marty Sweet <ms...@gmail.com> wrote:
>
>> Hi Indra,
>>
>> I pushed some documentation for this into 4.2 last night. I have attached
>> the PDF, see '12.10 Creating a Linux Template (page 105).
>>
>> Marty
>>
>>
>> On Fri, Aug 23, 2013 at 6:31 PM, Shanker Balan <
>> shanker.balan@shapeblue.com> wrote:
>>
>>> Comments inline.
>>>
>>> On 23-Aug-2013, at 10:51 PM, Indra Pramana <in...@sg.or.id>
>>>  wrote:
>>>
>>> > Dear all,
>>> >
>>> > I am using CloudStack 4.1.0 with KVM hypervisors. I tried to create
>>> CentOS
>>> > 6.4 template by installing a CentOS 6.4 VM from ISO, and then save the
>>> root
>>> > disk as a KVM template.
>>> >
>>> > However, when I tried to create a VM using the template, while the
>>> server
>>> > was created, the network is not working because the new VM activates
>>> > different ethernet port (eth1 instead of eth0) while on the original
>>> VM,
>>> > only eth0 was configured.
>>> >
>>> > If I tried to configure the network settings (DHCP) on both eth0 and
>>> eth1
>>> > and then recreate the template, the new VM based on the template will
>>> > activate eth2 instead.
>>> >
>>> > Anyone having similar problem and have found a solution to this
>>> problem? I
>>> > only have this issue with CentOS 6.4, I don't have any issues using
>>> CentOS
>>> > 5.9 or Ubuntu 13.04 / 12.04.2.
>>> >
>>> > Looking forward to your reply, thank you.
>>> >
>>>
>>> Hi Indra,
>>>
>>> Have you cleaned up ifcfg-eth MAC address definitions and
>>> /etc/udev/rules.d/70-persistent-net.rules files before creating the
>>> templates? I have seen this issue if there are stale MAC addresses defined
>>> to ifcfg-eth0.
>>>
>>> Regards.
>>>
>>> --
>>> @shankerbalan
>>>
>>> M: +91 98860 60539 | O: +91 (80) 67935867
>>> shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
>>> ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade
>>> Centre, Bangalore - 560 055
>>>
>>> This email and any attachments to it may be confidential and are
>>> intended solely for the use of the individual to whom it is addressed. Any
>>> views or opinions expressed are solely those of the author and do not
>>> necessarily represent those of Shape Blue Ltd or related companies. If you
>>> are not the intended recipient of this email, you must neither take any
>>> action based upon its contents, nor copy or show it to anyone. Please
>>> contact the sender if you believe you have received this email in error.
>>> Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue
>>> Services India LLP is operated under license from Shape Blue Ltd. ShapeBlue
>>> is a registered trademark.
>>>
>>
>>
>

Re: Problem creating VM using CentOS 6.4 template

Posted by Marty Sweet <ms...@gmail.com>.
Hi Indra,

I pushed some documentation for this into 4.2 last night. I have attached a
snippet of the PDF.

Marty


On Fri, Aug 23, 2013 at 6:47 PM, Marty Sweet <ms...@gmail.com> wrote:

> Hi Indra,
>
> I pushed some documentation for this into 4.2 last night. I have attached
> the PDF, see '12.10 Creating a Linux Template (page 105).
>
> Marty
>
>
> On Fri, Aug 23, 2013 at 6:31 PM, Shanker Balan <
> shanker.balan@shapeblue.com> wrote:
>
>> Comments inline.
>>
>> On 23-Aug-2013, at 10:51 PM, Indra Pramana <in...@sg.or.id>
>>  wrote:
>>
>> > Dear all,
>> >
>> > I am using CloudStack 4.1.0 with KVM hypervisors. I tried to create
>> CentOS
>> > 6.4 template by installing a CentOS 6.4 VM from ISO, and then save the
>> root
>> > disk as a KVM template.
>> >
>> > However, when I tried to create a VM using the template, while the
>> server
>> > was created, the network is not working because the new VM activates
>> > different ethernet port (eth1 instead of eth0) while on the original VM,
>> > only eth0 was configured.
>> >
>> > If I tried to configure the network settings (DHCP) on both eth0 and
>> eth1
>> > and then recreate the template, the new VM based on the template will
>> > activate eth2 instead.
>> >
>> > Anyone having similar problem and have found a solution to this
>> problem? I
>> > only have this issue with CentOS 6.4, I don't have any issues using
>> CentOS
>> > 5.9 or Ubuntu 13.04 / 12.04.2.
>> >
>> > Looking forward to your reply, thank you.
>> >
>>
>> Hi Indra,
>>
>> Have you cleaned up ifcfg-eth MAC address definitions and
>> /etc/udev/rules.d/70-persistent-net.rules files before creating the
>> templates? I have seen this issue if there are stale MAC addresses defined
>> to ifcfg-eth0.
>>
>> Regards.
>>
>> --
>> @shankerbalan
>>
>> M: +91 98860 60539 | O: +91 (80) 67935867
>> shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
>> ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre,
>> Bangalore - 560 055
>>
>> This email and any attachments to it may be confidential and are intended
>> solely for the use of the individual to whom it is addressed. Any views or
>> opinions expressed are solely those of the author and do not necessarily
>> represent those of Shape Blue Ltd or related companies. If you are not the
>> intended recipient of this email, you must neither take any action based
>> upon its contents, nor copy or show it to anyone. Please contact the sender
>> if you believe you have received this email in error. Shape Blue Ltd is a
>> company incorporated in England & Wales. ShapeBlue Services India LLP is
>> operated under license from Shape Blue Ltd. ShapeBlue is a registered
>> trademark.
>>
>
>

Re: Problem creating VM using CentOS 6.4 template

Posted by Shanker Balan <sh...@shapeblue.com>.
Comments inline.

On 23-Aug-2013, at 10:51 PM, Indra Pramana <in...@sg.or.id>
 wrote:

> Dear all,
>
> I am using CloudStack 4.1.0 with KVM hypervisors. I tried to create CentOS
> 6.4 template by installing a CentOS 6.4 VM from ISO, and then save the root
> disk as a KVM template.
>
> However, when I tried to create a VM using the template, while the server
> was created, the network is not working because the new VM activates
> different ethernet port (eth1 instead of eth0) while on the original VM,
> only eth0 was configured.
>
> If I tried to configure the network settings (DHCP) on both eth0 and eth1
> and then recreate the template, the new VM based on the template will
> activate eth2 instead.
>
> Anyone having similar problem and have found a solution to this problem? I
> only have this issue with CentOS 6.4, I don't have any issues using CentOS
> 5.9 or Ubuntu 13.04 / 12.04.2.
>
> Looking forward to your reply, thank you.
>

Hi Indra,

Have you cleaned up ifcfg-eth MAC address definitions and /etc/udev/rules.d/70-persistent-net.rules files before creating the templates? I have seen this issue if there are stale MAC addresses defined to ifcfg-eth0.

Regards.

--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.