[Lxc-users] Confusing behaviour using LXC container with systemd
John
lxc at jelmail.com
Tue Mar 12 21:13:41 UTC 2013
Hello, I've been trying to convert some containers to systemd. I have
implemented a systemd container using lxc.autodev with lxc.hook.autodev
to create additional devices and I can now start containers that run
systemd internally. I am, however, experiencing some problems and am at
a loss as to how I should troubleshoot.
My autodev hook contains the below:
#!/bin/bash
# LXC Autodev hook.
cd ${LXC_ROOTFS_MOUNT}
mknod -m 600 .//dev/tty0 c 4 0
mknod -m 666 .//dev/ptmx c 5 2
The first problem is that starting a container affects devices on the
host. I don't know how widespread the problem is but I noticed it
because my DVB-T tuner card stops working when I start a container that
uses systemd inside. Prior to starting the container I can reliably run
a dvb scan on the host and it works - once the container is started it
no longer works. It's as if the kernel modules somehow get messed up.
I have linked two pastebins below, showing the output of "systemctl
status" for such a container and "systemd-cgls" inside that container.
This container does nothing with dvb so has nothing installed inside it
that might explicitly interact with my dvb card.
http://pastebin.com/dGU80cGR
http://pastebin.com/X0J3vwfD
I have no idea how to troubeshoot this so I am looking for guidance. I
do wonder if it might have something to do with "systemd-udevd" inside
the container (does udev work inside a container now?).
The second problem might be related... If I start a systemd container
from a gui terminal window, the window starts pumping out characters
(normally "=" symbols but this changes if I type on the keyboard, though
not to the character typed). If I move the focus to another terminal
window the character output moves with the focus. This happens if I
start the container with "lxc-start" or with "systemctl". It does not
happen if I start the container on a text virtual terminal (Alt+F1). (in
case it's relevant, the gui is itself inside a container that is still
init-based).
These problems do not happen with init containers.
I would really appreciate some pointers that might help me troubleshoot
- as I say, I am at a loss...
Thanks very much,
John
3.6.11-1-ARCH #1 SMP PREEMPT Tue Dec 18 08:57:15 CET 2012 x86_64 GNU/Linux
More information about the lxc-users
mailing list