[systemd-devel] systemd and LXC

Lennart Poettering lennart at poettering.net
Wed Mar 21 16:10:02 PDT 2012


On Wed, 21.03.12 12:03, Dmitry Rozhkov (dmitry.rojkov at gmail.com) wrote:

> Hi,
> 
> I'm trying to run MeeGo SDK (http://merproject.org) as a LXC container,
> but there some complications related to systemd. The default target looks
> as follows:
> 
> [Unit]
> Description=Non-Graphical Interface
> #Requires=multi-user.target
> #After=multi-user.target
> Requires=systemd-logind.service
> Conflicts=rescue.target
> AllowIsolate=yes
> 
> [Install]
> Alias=default.target
> 
> But when I run `lxc-start -n mer` there is no output. It turned out that
> systemd uses the host's system console for its output which is not very
> convenient when starting containers remotely.
> 
> Is there a way to make systemd show its output in the container
> console?

You need to make sure /dev/console in the container points to the TTY
you want it to point to, for example by bind mounting it from your pty
or so. (systemd-nspawn does that implicitly, which might actually be
useful for your work?)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list