Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
app-emulation/lxd starting an unprivileged systemd container
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
superbrain666
n00b
n00b


Joined: 14 Apr 2005
Posts: 43
Location: Gentoo, Tübingen, Germany, World

PostPosted: Wed Feb 22, 2017 5:10 pm    Post subject: app-emulation/lxd starting an unprivileged systemd container Reply with quote

When i start

Code:
lxc launch images:centos/7/amd64 test1

or
Code:
lxc launch images:ubuntu/xenial/arm64 test2


the systemd init inside the container fails:
Code:

io linux # lxc exec test1 bash
[root@test1 ~]# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  42480  3988 ?        Ss   16:55   0:00 /sbin/init
root        12  0.0  0.0  11776  2880 ?        Ss   17:11   0:00 bash
root        21  0.0  0.0  47448  3384 ?        R+   17:11   0:00 ps aux
[root@test1 ~]#


On an ubuntu system this works fine.

Can someone give me a hint where to look?
Back to top
View user's profile Send private message
ntnn
n00b
n00b


Joined: 20 Mar 2017
Posts: 10

PostPosted: Mon Mar 20, 2017 1:19 pm    Post subject: Reply with quote

Did you remember to compile your kernel with the appropriate support? See https://wiki.gentoo.org/wiki/LXD#Kernel_configuration

Code:

$ lxc launch lxc:centos/7/amd64 test1
Creating test1
Starting test1
14:15:51 atlas:~ 31%>lxc list
+--------------+---------+------+---------------------------------------------+------------+-----------+
|     NAME     |  STATE  | IPV4 |                    IPV6                     |    TYPE    | SNAPSHOTS |
+--------------+---------+------+---------------------------------------------+------------+-----------+
...
+--------------+---------+------+---------------------------------------------+------------+-----------+
| test1        | RUNNING |      | 2a01:4f8:162:1230:216:3eff:fefc:7306 (eth0) | PERSISTENT | 0         |
+--------------+---------+------+---------------------------------------------+------------+-----------+
...
$ lxc exec test1 -- ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  42888  4824 ?        Ss   13:15   0:00 /sbin/init
root        12  0.0  0.0  36824  6456 ?        Ss   13:15   0:00 /usr/lib/systemd/systemd-journald
root        16  0.0  0.0  41396  3092 ?        Ss   13:15   0:00 /usr/lib/systemd/systemd-udevd
dbus        30  0.0  0.0  24280  2780 ?        Ss   13:15   0:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root        32  0.0  0.0  22072  2784 ?        Ss   13:15   0:00 /usr/lib/systemd/systemd-logind
root        33  0.0  0.0 221912  4776 ?        Ssl  13:15   0:00 /usr/sbin/rsyslogd -n
root        36  0.0  0.0   6456  1628 console  Ss+  13:15   0:00 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 linux
root       191  0.0  0.0  47444  3552 ?        Rs+  13:17   0:00 ps aux

Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum