this patch works for me. container is starting fine. but a login
(ssh/console) is not possible.
host: centos6
kernel: 3.13.2
libvirt: 1.2.1 (+ lxc: Add virCgroupSetOwner())
container logs says
agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted
agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted
agetty[38]: /dev/tty1: cannot set process group: Inappropriate ioctl for device
in my container:
# ls -la /dev/
total 4
drwxr-xr-x 3 root root 320 Feb 14 10:06 .
dr-xr-xr-x 20 root root 4096 Feb 13 10:06 ..
lrwxrwxrwx 1 root root 10 Feb 14 10:06 console -> /dev/pts/0
lrwxrwxrwx 1 root root 13 Feb 14 10:06 fd -> /proc/self/fd
crw-rw-rw- 1 root root 1, 7 Feb 14 10:06 full
crw-rw-rw- 1 root root 1, 3 Feb 14 10:06 null
crw-rw-rw- 1 root root 5, 2 Feb 14 10:06 ptmx
drwxr-xr-x 2 root root 0 Feb 14 10:06 pts
crw-rw-rw- 1 root root 1, 8 Feb 14 10:06 random
lrwxrwxrwx 1 root root 15 Feb 14 10:06 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Feb 14 10:06 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Feb 14 10:06 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root root 5, 0 Feb 14 10:06 tty
lrwxrwxrwx 1 root root 10 Feb 14 10:06 tty1 -> /dev/pts/0
crw-rw-rw- 1 root root 1, 9 Feb 14 10:06 urandom
crw-rw-rw- 1 root root 1, 5 Feb 14 10:06 zero
# ls -la /dev/pts/
total 0
drwxr-xr-x 2 root root 0 Feb 14 10:06 .
drwxr-xr-x 3 root root 320 Feb 14 10:06 ..
crw--w---- 1 root root 136, 0 Feb 14 10:07 0
crw-rw-rw- 1 root root 5, 2 Feb 14 10:07 ptmx
"chgrp tty /dev/pts/0" and then "exec /sbin/init
systemd.log_level=debug" has no effect. still the same error "cannot
get controlling tty: Operation not permitted"
--
Software is like sex, it's better when it's free!