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

Peter Steele pwsteele at gmail.com
Sun Aug 30 19:00:28 UTC 2015


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 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





More information about the lxc-users mailing list