[lxc-users] Configuring LXC containers to use a host bridge under CentOS 7

Serge Hallyn serge.hallyn at ubuntu.com
Mon Aug 31 13:34:04 UTC 2015


Quoting Peter Steele (pwsteele at gmail.com):
> On 08/30/2015 11:10 AM, Peter Steele wrote:
> >Clearly there is user error here on my part and I am not correctly
> >specifying how to configure LXC containers to use host bridging
> >under CentOS. I'll have to do some more digging.
> >
> 
> I figured it out. I've been using commands similar to
> 
> lxc-create -t /bin/true -n test1 --dir=/lxc/test1/rootfs
> 
> I mistakenly assumed that by specifying the directory for the rootfs
> to be /lxc/test1/rootfs the config file for the container would be
> /lxc/test1/config. Stupid mistake. LXC still puts the config file in

D'oh.  fwiw [-P | --lxcpath] is that option.  (--dir specifically means
specify the container rootfs.)

> the default location /var/lib/lxc/test1/config, and this file was
> where virbr0 was being specified. My own config file was correct
> such as it was, except that it was being ignored. I changed the
> config file /var/lib/lxc/test1/config to use br0 instead of virbr0
> and that solved my problem. My container can now see the full
> subnet.
> 
> A stupid beginner's mistake. What a waste of time... :-(
> 
> Thanks for all the feedback.
> 
> Peter
> 
> 
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list