[lxc-users] Is it possible nested LXC-libvirt containers?

CDR venefax at gmail.com
Wed Apr 30 13:15:21 UTC 2014

"Or you could just tell lxc tools to connect the container
to the virbr0 device that libvirt already provided."
That was exactly my idea. I created a libvirt Fedora 20 container,
installed libvirt and lxc inside, created a pure LXC container and
tried to connect its network to virbr0. Except that when do this
virsh net-start default
error: Failed to start network nat
error: Unable to set bridge nat0 forward_delay: Read-only file system
If you can point to how to replicate what libvirt does behind the
scenes with virbr0, it will solve the issue.
Actually there should be already a simpler way to do this, like a
downloadable rpm, that would create a similar nat functionality using
the same config file that libvirt uses for virbr0.
I wonder if anybody has seen this problem before.

On Wed, Apr 30, 2014 at 9:06 AM, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Wed, Apr 30, 2014 at 09:01:56AM -0400, CDR wrote:
>> I need to provide NAT networking to my LXC containers, much like using
>> virbr0 from libvirt, except that nesting a libvirt-lxc container does
>> not work. So if I nest a pure LXC container, which is supported, how
>> would you create a bridge that would nat-forward the packets to the
>> network?
>> I am sure it is possible, but it escapes me.
> Well you could replicate what libvirt does with virbr0 - which is basically
> just create a bare bridge device and setup iptables rules for forwarding
> and masquerading. Or you could just tell lxc tools to connect the container
> to the virbr0 device that libvirt already provided.
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
> _______________________________________________
> 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