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

Mark Constable markc at renta.net
Thu Jul 23 06:23:26 UTC 2015


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?

***

FWIW this is kind of what I am doing, to get openssh-server so I can SSH
in and proceed with automating container setup (this used to work a month
or so ago with vivid and wily containers)...

lxc exec w1 -- bash -c 'echo w1.lxc > /etc/hostname'
lxc exec w1 -- bash -c 'hostname w1.lxc'
lxc exec w1 -- bash -c 'systemctl restart networking.service'
Failed to get D-Bus connection: No such file or directory

Then I'd apt-get update and install openssh-server nano git ca-certificates

Maybe my question should be what is the best way to get sshd up and running
in a freshly downloaded image so I can proceed with system setup (via ssh)?


More information about the lxc-users mailing list