[lxc-users] Antw: Re: Cannot start network: Failed to attach
Fajar A. Nugraha
list at fajar.net
Thu Feb 25 09:44:15 UTC 2016
On Wed, Feb 24, 2016 at 7:51 PM, Thomas Belián
<thomas.belian at fh-erfurt.de> wrote:
>>>> Jochen Wiedmann <jochen.wiedmann at gmail.com> schrieb am 2/24/2016 um
> 10:06 AM in
> Nachricht
>> Thanks! Installing libvirt fixed my problem.
>>
>> Jochen
>
> Hello Jochen,
>
> I think next time it should be enough to install bridge-utils und to
> create the bridge you need (virbr, you can create it via
> /etc/sysconfig/network-scripts/ifcfg-virbr0).
With THAT alone, you'd get something similar to vmware/virtualbox's
"host only network". If you want the container to access outside host,
you also need to setup iptables and dnsmasq.
Later versions of lxc have a script that makes this easier. For
example, in 2.0.0-0.1.beta2 you'd have /etc/init.d/lxc-net which
basically calls "/usr/libexec/lxc/lxc-net start|stop".
You CAN create RPM for lxc-2.0.0-0.1.beta2 from github sources, but
using it on centos6 requires you to edit some files manually (e.g.
replace "ip link add dev ${LXC_BRIDGE} type bridge" with "brctl addbr
${LXC_BRIDGE}" on /usr/libexec/lxc/lxc-net)
--
Fajar
More information about the lxc-users
mailing list