[Devel] Re: [Lxc-users] PHYS type lxc not working

2010-09-01 Thread atp
You need to add a macvlan device to the parent device with the same
mode.

So, if you have a macvlan with a link device of eth0, you'll need to
create a macvlan device off eth0 - e.g. eth0:1 that is of mode bridge.

There was an email yesterday that showed how to do that. 

Andy

On Thu, 2010-07-08 at 10:13 +0530, Sabdar wrote:
> ok thanks for the information,i will make a try on 2.6.35-rc4 kernel
> and with latest lxc package.Also can anyone suggest how to make
> macvlan container communicate with the host.i can make macvlan
> communicate with other container using macvlan bridge mode similarly
> is there any way that i can make it to allow communicate with host as
> well.
> 
> 
> Thanks,
> Sabdar.  
> 
> On Thu, Jul 8, 2010 at 4:03 AM, Matt Helsley 
> wrote:
> 
> On Mon, Jul 05, 2010 at 10:09:21AM +0530, Sabdar wrote:
> >Hi all,
> > I want to use the below configuration in lxc, but
> the problem is the
> > physical interface is not getting release after i stop the
> container like it
> > happens in macvlan type.The interface gets disappear from
> host and i can
> > restore that only if i reboot my system,
> >
> > lxc.utsname = gamma
> > lxc.network.type = phys
> > lxc.network.flags = up
> > lxc.network.link = eth0
> > lxc.network.name = eth0
> > lxc.network.ipv4 = 192.168.10.1
> >
> > My kernel version :- linux-2.6.33
> 
> 
> Have you tried 2.6.35-rc4? It has Eric's sysfs and netns
> tagging
> patches which enhance support for using physical interfaces.
> 
> Cc'ing lxc-users (which is probably a better place to ask)
> 
> > Lxc version :- 0.6.5
> 
> 
> lxc 0.7.1 is also out.
> 
> I'm sorry, I know this isn't much help in figuring out the
> exact nature of the problem. Hopefully Cc'ing lxc-users will
> help.
> 
> Cheers,
>-Matt Helsley
> 
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___ Lxc-users mailing list 
> lxc-us...@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/lxc-users
Andrew Phillips
Head of Systems

www.lmax.com 

Office: +44 203 1922509
Mobile: +44 (0)7595 242 900

LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN




The information in this e-mail and any attachment is confidential and is 
intended only for the named recipient(s). The e-mail may not be disclosed or 
used by any person other than the addressee, nor may it be copied in any way. 
If you are not a named recipient please notify the sender immediately and 
delete any copies of this message. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden. Any view or 
opinions presented are solely those of the author and do not necessarily 
represent those of the company.
___
Containers mailing list
contain...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

___
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel


[Devel] Re: [Lxc-users] PHYS type lxc not working

2010-07-19 Thread Daniel Lezcano
On 07/19/2010 09:21 AM, Sabdar wrote:
> Hi,
>   i tried the same but by upgrading to the latest ip utility and its
> works fine as you specified.With the old ip utility the "link add" commands
> fails,Thanks for the help.
>
> I tried "PHYS" in the kernel version 2.6.35-rc4 and phys seems to work but
> with a problem ie) the working configuration is as follows,
>
> lxc.utsname = gamma
> lxc.network.type = phys
> lxc.network.flags = up
> *lxc.network.link = eth0*
> *lxc.network.name** = eth0*
> lxc.network.ipv4 = 192.168.10.1
>
> The same when we change as below  fails to release the host interface after
> lxc is stopped
>
> lxc.utsname = gamma
> lxc.network.type = phys
> lxc.network.flags = up
> *lxc.network.link = eth1*
> *lxc.network.name** = eth0*
> lxc.network.ipv4 = 192.168.10.1
>
> Instead i see an interface as dev3 in my host after the lxc is stopped.Is it
> necessary that both the network.link and network.name has to be same in the
> case of "PHYS".
>

When the container exits, the kernel "move" the physical interface from 
the container space to the host space.
But within the container, the physical interface is named "eth0", when 
it goes back to the host, the name is conflicting because the host has 
another interface with the eth0 name. So the kernel creates a new name 
(eg. dev3).

When no name is specified in the configuration file, the default name is 
"eth0", you are probably right that would make sense to keep the 
original name for the physical interface instead of defaulting to "eth0" 
but at the cost of having to modify generic scripts within the container 
to match the physical interface name.

IMHO, the kernel should reassign the previous name when the interface 
goes back to the host namespace, and if it conflicts then create a new 
name like "dev%d".

Thanks
   -- Daniel
___
Containers mailing list
contain...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

___
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel


[Devel] Re: [Lxc-users] PHYS type lxc not working

2010-07-19 Thread Sabdar
Hi,
 i tried the same but by upgrading to the latest ip utility and its
works fine as you specified.With the old ip utility the "link add" commands
fails,Thanks for the help.

I tried "PHYS" in the kernel version 2.6.35-rc4 and phys seems to work but
with a problem ie) the working configuration is as follows,

lxc.utsname = gamma
lxc.network.type = phys
lxc.network.flags = up
*lxc.network.link = eth0*
*lxc.network.name* * = eth0*
lxc.network.ipv4 = 192.168.10.1

The same when we change as below  fails to release the host interface after
lxc is stopped

lxc.utsname = gamma
lxc.network.type = phys
lxc.network.flags = up
*lxc.network.link = eth1*
*lxc.network.name* * = eth0*
lxc.network.ipv4 = 192.168.10.1

Instead i see an interface as dev3 in my host after the lxc is stopped.Is it
necessary that both the network.link and network.name has to be same in the
case of "PHYS".

Thanks,
Sabdar.


On Thu, Jul 8, 2010 at 1:27 PM, atp  wrote:

> You need to add a macvlan device to the parent device with the same
> mode.
>
> So, if you have a macvlan with a link device of eth0, you'll need to
> create a macvlan device off eth0 - e.g. eth0:1 that is of mode bridge.
>
> There was an email yesterday that showed how to do that.
>
> Andy
>
> On Thu, 2010-07-08 at 10:13 +0530, Sabdar wrote:
> > ok thanks for the information,i will make a try on 2.6.35-rc4 kernel
> > and with latest lxc package.Also can anyone suggest how to make
> > macvlan container communicate with the host.i can make macvlan
> > communicate with other container using macvlan bridge mode similarly
> > is there any way that i can make it to allow communicate with host as
> > well.
> >
> >
> > Thanks,
> > Sabdar.
> >
> > On Thu, Jul 8, 2010 at 4:03 AM, Matt Helsley 
> > wrote:
> >
> > On Mon, Jul 05, 2010 at 10:09:21AM +0530, Sabdar wrote:
> > >Hi all,
> > > I want to use the below configuration in lxc, but
> > the problem is the
> > > physical interface is not getting release after i stop the
> > container like it
> > > happens in macvlan type.The interface gets disappear from
> > host and i can
> > > restore that only if i reboot my system,
> > >
> > > lxc.utsname = gamma
> > > lxc.network.type = phys
> > > lxc.network.flags = up
> > > lxc.network.link = eth0
> > > lxc.network.name = eth0
> > > lxc.network.ipv4 = 192.168.10.1
> > >
> > > My kernel version :- linux-2.6.33
> >
> >
> > Have you tried 2.6.35-rc4? It has Eric's sysfs and netns
> > tagging
> > patches which enhance support for using physical interfaces.
> >
> > Cc'ing lxc-users (which is probably a better place to ask)
> >
> > > Lxc version :- 0.6.5
> >
> >
> > lxc 0.7.1 is also out.
> >
> > I'm sorry, I know this isn't much help in figuring out the
> > exact nature of the problem. Hopefully Cc'ing lxc-users will
> > help.
> >
> > Cheers,
> >-Matt Helsley
> >
> >
> >
> --
> > This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> > ___ Lxc-users mailing list
> lxc-us...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
> Andrew Phillips
> Head of Systems
>
> www.lmax.com
>
> Office: +44 203 1922509
> Mobile: +44 (0)7595 242 900
>
> LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN
>
>
>
>
> The information in this e-mail and any attachment is confidential and is
> intended only for the named recipient(s). The e-mail may not be disclosed or
> used by any person other than the addressee, nor may it be copied in any
> way. If you are not a named recipient please notify the sender immediately
> and delete any copies of this message. Any unauthorized copying, disclosure
> or distribution of the material in this e-mail is strictly forbidden. Any
> view or opinions presented are solely those of the author and do not
> necessarily represent those of the company.
>
___
Containers mailing list
contain...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

___
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel