[lxc-users] instantiate_veth: 2669 failed to attach 'vethMU7OO1' to the bridge
Fajar A. Nugraha
list at fajar.net
Sun May 28 23:57:16 UTC 2017
On Mon, May 29, 2017 at 5:58 AM, Rick Leir <rleir at leirtech.com> wrote:
> # brctl show
>
> bridge name bridge id STP enabled interfaces
> virbr0 8000.525400c7428b yes virbr0-nic
> # lxc-checkconfig
> <all enabled>
>
> # lxc-create -n crowdsr -t fedora
>
> # lxc-start -n crowdsr -F
> lxc-start: conf.c: instantiate_veth: 2669 failed to attach 'vethMU7OO1'
> to the bridge 'lxcbr0': Operation not permitted
>
>
> brctl shows only virbr0; you are trying to attach to lxcbr0 which,
> apparently, doesn't exist. I thought lxc created that but you can add it
> with
>
> brctl addbr lxcbr0
>
> Mike
> Thanks so much for this. It led me to virsh and eventually to the Fedora
> doco at
> https://fedoraproject.org/wiki/LXC
>
>
Hmmm ... that doc is outdated in several ways.
> which is where I should have searched first. After I start libvirtd, it
> tells me to:
> Edit the file /etc/lxc/default.conf and change the parameter
> 'lxc.network.link' from 'lxcbr0' to 'virbr0':
>
> Then I can create and start a container successfully. Woo woo
>
>
There are at least several tools that make use of linux container
capabilites:
- lxc/lxd
- libvirt
- docker
- systemd-nspawn
IMHO the easiest way to use lxc is with lxd. Unofficial packages exists (at
least it did in the past) for fedora, but the easiest way to get started
with lxd is on ubuntu (a live trial is available on
https://linuxcontainers.org/lxd/try-it/).
Libvirt has its own lxc driver (http://libvirt.org/drvlxc.html), and you
manage it using 'virsh'. lxc1 has its own userland tools (e.g. lxc-create),
and by default should include an init script which creates lxcbr0 (with its
appropriate NAT rules). The wiki link you mentioned mix both, using libvirt
ONLY for the bridge, while using lxc1 userland tools to manage the
container. IMHO not an ideal setup.
Another thing, the page says 'debootstrap is necessary in order to build
Debian-based containers'. That is true if you want to build a debian/ubuntu
container from scratch, but for most users the 'download' template should
be enough (and MUCH faster to create) and it doesn't need debootstrap/dpkg
installed on the host.
--
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170529/2c8f3c21/attachment.html>
More information about the lxc-users
mailing list