[lxc-users] LXD container how to start network?

Fajar A. Nugraha list at fajar.net
Thu Jul 23 06:32:33 UTC 2015


On Thu, Jul 23, 2015 at 1:23 PM, Mark Constable <markc at renta.net> wrote:
> On Thursday, July 23, 2015 08:55:21 AM Andrey Repin wrote:
>> > *buntu wily host and unprivileged lxd containers. This used to work but
>> > as you can see I seem to need dbus... on a headless server!
>>
>> Yes, you need dbus. It is a generic communication service, has nothing to
>> do with not being a headless server.
>
> Sure but it's not available, or not running, when I launch a container so
> the very first thing I need to do is install some dbus package (I presume)
> but to do that I need to start the network. Catch 22.
>
> How do you folks get a working network with current wily containers?

IIRC networking on unprivileged systemd container was broken due to
some changes in systemd. This is true even on current release (vivid).
If this hasn't been fixed, then you can't use unprivileged wily as-is,
regardless whether dbus is installed or not. There are workarounds for
this (including creating custom systemd units).

You should always be able to configure network manually though (e.g.
"ifconfig"). Another workaround is to use "lxc-attach -s", and ommit
network namespace, so that the container would use host's networking,
thus you will be able to install packages using apt-get.

-- 
Fajar


More information about the lxc-users mailing list