[lxc-users] Setting lxc.network.veth.pair

Michael H. Warfield mhw at WittsEnd.com
Sun Aug 30 22:10:34 UTC 2015


On Sun, 2015-08-30 at 13:51 -0700, Peter Steele wrote:
> I want to pick my own naming convention for the veth interfaces
> created 
> by LXC rather than using the auto-generated names. I tried adding the
> entry

> lxc.network.veth.pair = veth0

> in one of my privileged containers but it still get a random name of 
> 'veth6HIE0A' instead of eth0. Am I mistaken as to how this is
> supposed 
> to work. Ideally I would like to see something like 
> 'veth0-<container-name>' but 'vethN' when N either is assigned 
> automatically when containers are started or alternatively where I
> set N 
> myself in the container's config. What's possible and what's not?

I played with this a while back and found that you are severely limited
for the name length.  Using the container name for that is, sooner or
later, going to overflow that limit and possibly generated an error on
container startup.  I think it's a kernel limit and not configurable or
negotiable, but that was a couple of years ago and may have changed.

YMMV

> Thanks.

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150830/a60e061b/attachment-0001.sig>


More information about the lxc-users mailing list