You are not logged in.

#1 2013-05-12 15:35:38

m4ntiz
Member
Registered: 2013-05-12
Posts: 1

[SOLVED] [lxc] Problems with archlinux template (and systemd)

Hello, recently I was pointed to lxc. I tried the archlinux and debian templates (ubuntu and fedora doesn't work because the "arch" command cannot be found but curently I don't care about these templates).

The debian template seems to work just fine but the archlinux template doesn't.

I think the main problem is that the arch-system runs with systemd while debian still uses initscripts. I found some resources saying that systemd does not work within a lxc-container while others say that some modifications have to be done in order to make systemd to work properly. But all modifications (I found) that should be made are already included in the archlinux template. But it is still not working for me. :-(

The output is as follows:

# sudo lxc-start -n test-arch
systemd 203 running in system mode. (+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
Detected virtualization 'lxc'.

Welcome to Arch Linux!

Set hostname to <test-arch>.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Listening on Journal Socket.
         Starting Journal Service...
[  OK  ] Started Journal Service.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Encrypted Volumes.
         Starting Setup Virtual Console...
[  OK  ] Reached target Swap.
         Starting Remount Root and Kernel File Systems...
         Mounting Temporary Directory...
systemd-journald.service: main process exited, code=exited, status=219/CGROUP
Unit systemd-journald.service entered failed state.
systemd-vconsole-setup.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Setup Virtual Console.
See 'systemctl status systemd-vconsole-setup.service' for details.
Unit systemd-vconsole-setup.service entered failed state.
systemd-remount-fs.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Remount Root and Kernel File Systems.
See 'systemctl status systemd-remount-fs.service' for details.
Unit systemd-remount-fs.service entered failed state.
tmp.mount mount process exited, code=exited status=219
[FAILED] Failed to mount Temporary Directory.
See 'systemctl status tmp.mount' for details.
Unit tmp.mount entered failed state.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Trigger Flushing of Journal to Persistent Storage...
         Starting Recreate Volatile Files and Directories...
         Starting Load Random Seed...
systemd-journal-flush.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Trigger Flushing of Journal to Persistent Storage.
See 'systemctl status systemd-journal-flush.service' for details.
Unit systemd-journal-flush.service entered failed state.
systemd-tmpfiles-setup.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Recreate Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
Unit systemd-tmpfiles-setup.service entered failed state.
systemd-random-seed-load.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Load Random Seed.
See 'systemctl status systemd-random-seed-load.service' for details.
Unit systemd-random-seed-load.service entered failed state.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
         Starting Login Service...
         Starting Permit User Sessions...
systemd-journald.service holdoff time over, scheduling restart.
[  OK  ] Stopped Trigger Flushing of Journal to Persistent Storage.
         Stopping Journal Service...
[  OK  ] Stopped Journal Service.
         Starting Journal Service...
[  OK  ] Started Journal Service.
         Starting Trigger Flushing of Journal to Persistent Storage...
dbus.service: main process exited, code=exited, status=219/CGROUP
Unit dbus.service entered failed state.
systemd-logind.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Login Service.
See 'systemctl status systemd-logind.service' for details.
Unit systemd-logind.service entered failed state.
systemd-user-sessions.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Permit User Sessions.
See 'systemctl status systemd-user-sessions.service' for details.
Unit systemd-user-sessions.service entered failed state.
systemd-journald.service: main process exited, code=exited, status=219/CGROUP
Unit systemd-journald.service entered failed state.
systemd-journal-flush.service: main process exited, code=exited, status=219/CGROUP
[FAILED] Failed to start Trigger Flushing of Journal to Persistent Storage.
See 'systemctl status systemd-journal-flush.service' for details.
Unit systemd-journal-flush.service entered failed state.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
         Starting Console Getty...
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.

I created the container with

sudo lxc-create -t archlinux -n test-arch

and did nothing more because it seems to me that nothing more should be needed.

I read a lot and most readings say that one has to use initscripts because systemd is not working while others say systemd is working with modifications, e.g. https://wiki.archlinux.org/index.php/Lxc-systemd

But above is everything I get, no login-prompt or anything else, it just hangs. Trying to invoke "lxc-stop -n test-arch" initiates the shutdown but then both terminals just hang and I have to kill the lxc-start process.

I would like to know:
1. is it possible to run a container with systemd? Or do I have to use initscripts?
2. are there any modifications I have to do besides the modifications already provided by the archlinux template script (in order to use systemd)?
3. what possibilities do I have to see what's missing or configured wrong?

Thank you very much. ;-)

// Edit:

Ok, sorry for the noise.
As a last chance I tried a fresh Arch installation within a VM and that works fine (I should have tried this first :-( ). It turned out that my problem is that I am running the ck-kernel which lacks support for "Cgroup sched" and "Cgroup cpu account".
I will ask the ck-guy to support these options.
Until then I will have to use the kernel from the core-repo.

Last edited by m4ntiz (2013-05-20 12:38:52)

Offline

Board footer

Powered by FluxBB