lxc-checkconfig / Cgroup namespace: required
Hi all,
Running an 3.2.0-35-generic kernel, none of my LXC containers start.
lxc-checkconfig :
Kernel config /proc/config.gz not found, looking in other places...
Found kernel config file /boot/config-
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled
--- Control groups ---
Cgroup: enabled
Cgroup namespace: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
It seems that Cgroup namespace is not available ...
lxc-start -n VM0
lxc-start: failed to spawn VM0
dmesg :
...
[ 9394.358347] ADDRCONF(
mount | grep cgroup :
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,
cgroup on /sys/fs/
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
Did I miss something ?
Thank you by advance for your help.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu lxc Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Stephane Neveu
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
what is the result of command:
sudo lxc-start -n container /sbin/init loglevel=debug
Revision history for this message
|
#2 |
sudo lxc-start -n VM0 /sbin/init loglevel=debug
Revision history for this message
|
#4 |
Hi Jason
It gives exactly the same output :
sudo lxc-start -n VM0 /sbin/init loglevel=debug
lxc-start: failed to spawn 'VM0'
and that's all :/
I don't know if you've noticed but my lxc-checkconfig isn't ok :
Cgroup namespace: required
Revision history for this message
|
#5 |
with a strace :
execve(
brk(0) = 0xcb3000
access(
mmap(NULL, 8192, PROT_READ|
access(
open("/
stat("/
open("/
stat("/
open("/
stat("/
open("/
read(3, "\177ELF\
fstat(3, {st_mode=
mmap(NULL, 2268480, PROT_READ|
mprotect(
mmap(0x7f34ed13
mmap(0x7f34ed14
close(3) = 0
open("/
open("/
fstat(3, {st_mode=
mmap(NULL, 31569, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f34ed35c000
close(3) = 0
access(
open("/
read(3, "\177ELF\
fstat(3, {st_mode=
mmap(NULL, 3925208, PROT_READ|
mprotect(
mmap(0x7f34ecf0
mmap(0x7f34ecf1
close(3) = 0
open("/
access(
open("/
read(3, "\177ELF\
fstat(3, {st_mode=
mmap(NULL, 4096, PROT_READ|
mmap(NULL, 2105600, PROT_READ|
mprotect(
mmap(0x7f34ecb5
close(3) = 0
open("/
access(
open("/
read(3, "\177ELF\
fstat(3, {st_mode=
mmap(NULL, 2114120, PROT_READ|
mprotect(
mmap(0x7f34ec95
close(3) = 0
open("/
access(
open("/
read(3, "\177ELF\
fstat(3, {st_mode=
mmap(NULL, 2134856, PROT_READ|
mprotect(
mmap(0x7f34ec75
close(3) = 0
mmap(NULL, 4096, PROT_READ|
mmap(NULL, 4096, PROT_READ|
mmap(NULL, 4096, PROT_READ|
arch_prctl(
mprotect(
mprotect(
mprotect(
mprotect(
mprotect(
mprotect(0x602000, 4096, PROT_READ) = 0
mprotect(
munmap(
getuid() = 0
getgid() = 0
geteuid() = 0
brk(0) = 0xcb3000
brk(0xcd4000) = 0xcd4000
access(
open("/
fstat(3, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(3, "lxc.network.
read(3, "", 4096) = 0
close(3) = 0
munmap(
openat(AT_FDCWD, "/proc/self/fd", O_RDONLY|
getdents(3, /* 6 entries */, 32768) = 144
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
stat("/
open("/
fstat(3, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(3, "Y\n", 4096) = 2
close(3) = 0
munmap(
getuid() = 0
socket(PF_FILE, SOCK_DGRAM, 0) = 3
sendto(3, "\0\0\0\
close(3) = 0
open("/dev/ptmx", O_RDWR) = 3
statfs("/dev/pts", {f_type=
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, TIOCGPTN, [2]) = 0
stat("/dev/pts/2", {st_mode=
getuid() = 0
socket(PF_FILE, SOCK_STREAM|
connect(4, {sa_family=AF_FILE, path="/
close(4) = 0
socket(PF_FILE, SOCK_STREAM|
connect(4, {sa_family=AF_FILE, path="/
close(4) = 0
open("/
fstat(4, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(4, "# /etc/nsswitch.
read(4, "", 4096) = 0
close(4) = 0
munmap(
open("/
open("/
fstat(4, {st_mode=
mmap(NULL, 31569, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f34ed35c000
close(4) = 0
access(
open("/
read(4, "\177ELF\
fstat(4, {st_mode=
mmap(NULL, 2131240, PROT_READ|
mprotect(
mmap(0x7f34ec54
close(4) = 0
open("/
access(
open("/
read(4, "\177ELF\
fstat(4, {st_mode=
mmap(NULL, 2202328, PROT_READ|
mprotect(
mmap(0x7f34ec33
mmap(0x7f34ec33
close(4) = 0
mprotect(
mprotect(
munmap(
open("/
open("/
fstat(4, {st_mode=
mmap(NULL, 31569, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f34ed35c000
close(4) = 0
access(
open("/
read(4, "\177ELF\
fstat(4, {st_mode=
mmap(NULL, 2143552, PROT_READ|
mprotect(
mmap(0x7f34ec12
close(4) = 0
open("/
access(
open("/
read(4, "\177ELF\
fstat(4, {st_mode=
mmap(NULL, 2148472, PROT_READ|
mprotect(
mmap(0x7f34ebf1
close(4) = 0
mprotect(
mprotect(
munmap(
open("/etc/group", O_RDONLY|O_CLOEXEC) = 4
lseek(4, 0, SEEK_CUR) = 0
fstat(4, {st_mode=
mmap(NULL, 734, PROT_READ, MAP_SHARED, 4, 0) = 0x7f34ed363000
lseek(4, 734, SEEK_SET) = 734
munmap(
close(4) = 0
ioctl(3, TIOCSPTLCK, [0]) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, TIOCGPTN, [2]) = 0
stat("/dev/pts/2", {st_mode=
open("/dev/pts/2", O_RDWR|O_NOCTTY) = 4
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
open("/dev/ptmx", O_RDWR) = 5
ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [3]) = 0
stat("/dev/pts/3", {st_mode=
getuid() = 0
ioctl(5, TIOCSPTLCK, [0]) = 0
ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [3]) = 0
stat("/dev/pts/3", {st_mode=
open("/dev/pts/3", O_RDWR|O_NOCTTY) = 6
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
open("/dev/ptmx", O_RDWR) = 7
ioctl(7, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(7, TIOCGPTN, [4]) = 0
stat("/dev/pts/4", {st_mode=
getuid() = 0
ioctl(7, TIOCSPTLCK, [0]) = 0
ioctl(7, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(7, TIOCGPTN, [4]) = 0
stat("/dev/pts/4", {st_mode=
open("/dev/pts/4", O_RDWR|O_NOCTTY) = 8
fcntl(7, F_SETFD, FD_CLOEXEC) = 0
fcntl(8, F_SETFD, FD_CLOEXEC) = 0
open("/dev/ptmx", O_RDWR) = 9
ioctl(9, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(9, TIOCGPTN, [5]) = 0
stat("/dev/pts/5", {st_mode=
getuid() = 0
ioctl(9, TIOCSPTLCK, [0]) = 0
ioctl(9, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(9, TIOCGPTN, [5]) = 0
stat("/dev/pts/5", {st_mode=
open("/dev/pts/5", O_RDWR|O_NOCTTY) = 10
fcntl(9, F_SETFD, FD_CLOEXEC) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
access("/dev/tty", F_OK) = 0
open("/dev/tty", O_RDWR) = 11
close(11) = 0
open("/dev/ptmx", O_RDWR) = 11
ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(11, TIOCGPTN, [6]) = 0
stat("/dev/pts/6", {st_mode=
getuid() = 0
ioctl(11, TIOCSPTLCK, [0]) = 0
ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(11, TIOCGPTN, [6]) = 0
stat("/dev/pts/6", {st_mode=
open("/dev/pts/6", O_RDWR|O_NOCTTY) = 12
fcntl(11, F_SETFD, FD_CLOEXEC) = 0
fcntl(12, F_SETFD, FD_CLOEXEC) = 0
getuid() = 0
open("/dev/tty", O_RDWR|
getuid() = 0
ioctl(13, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(13, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(13, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(13, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost -isig -icanon -echo ...}) = 0
ioctl(13, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
rt_sigprocmask(
signalfd4(-1, ~[ILL BUS SEGV RTMIN RT_1], 8, 0) = 14
fcntl(14, F_SETFD, FD_CLOEXEC) = 0
open("/
fstat(15, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(15, "0\n", 1024) = 2
close(15) = 0
munmap(
clone(child_
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 23740
socketpair(PF_FILE, SOCK_STREAM, 0, [15, 16]) = 0
fcntl(15, F_SETFD, FD_CLOEXEC) = 0
getpid() = 23739
lstat("vethACTW3S", 0x7fffeae27ec0) = -1 ENOENT (No such file or directory)
lstat("vethvfEwiq", 0x7fffeae27ec0) = -1 ENOENT (No such file or directory)
socket(PF_NETLINK, SOCK_RAW, 0) = 17
setsockopt(17, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(17, SOL_SOCKET, SO_RCVBUF, [32768], 4) = 0
bind(17, {sa_family=
getsockname(17, {sa_family=
sendmsg(17, {msg_name(
recvmsg(17, {msg_name(
close(17) = 0
access("/proc/net", R_OK) = 0
access(
socket(PF_FILE, SOCK_DGRAM|
ioctl(17, SIOCGIFINDEX, {ifr_name=
close(17) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 17
ioctl(17, SIOCBRADDIF, 0x7fffeae27f50) = 0
close(17) = 0
socket(PF_FILE, SOCK_DGRAM|
ioctl(17, SIOCGIFINDEX, {ifr_name=
close(17) = 0
socket(PF_NETLINK, SOCK_RAW, 0) = 17
setsockopt(17, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(17, SOL_SOCKET, SO_RCVBUF, [32768], 4) = 0
bind(17, {sa_family=
getsockname(17, {sa_family=
socket(PF_FILE, SOCK_DGRAM|
ioctl(18, SIOCGIFINDEX, {ifr_name=
close(18) = 0
sendmsg(17, {msg_name(
recvmsg(17, {msg_name(
close(17) = 0
lstat("/var", {st_mode=
lstat("/var/lib", {st_mode=
lstat("
readlink(
lstat("/data", {st_mode=
lstat("/data/lxc", {st_mode=
lstat("
lstat("
lstat("
access(
stat("/
open("/
clone(child_
close(15) = 0
read(16, "\0\0\0\0", 4) = 4
open("/
fstat(15, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(15, "rootfs / rootfs rw 0 0\nsysfs /sy"..., 1024) = 696
read(15, "", 1024) = 0
close(15) = 0
munmap(
socket(PF_FILE, SOCK_DGRAM, 0) = 15
sendto(15, "\0\0\0\
close(15) = 0
kill(23779, SIGKILL) = 0
close(16) = 0
write(2, "lxc-start: ", 11lxc-start: ) = 11
write(2, "failed to spawn 'cc0'", 21failed to spawn 'cc0') = 21
write(2, "\n", 1
) = 1
rt_sigaction(
rt_sigaction(
open("/
fstat(15, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(15, "rootfs / rootfs rw 0 0\nsysfs /sy"..., 1024) = 696
read(15, "", 1024) = 0
close(15) = 0
munmap(
socket(PF_FILE, SOCK_DGRAM, 0) = 15
sendto(15, "\0\0\0\
close(15) = 0
socket(PF_FILE, SOCK_DGRAM, 0) = 15
sendto(15, "\0\0\0\
close(15) = 0
rt_sigprocmask(
--- SIGCHLD (Child exited) @ 0 (0) ---
ioctl(13, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
ioctl(13, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) = 0
ioctl(13, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
close(11) = 0
close(12) = 0
close(3) = 0
close(4) = 0
close(5) = 0
close(6) = 0
close(7) = 0
close(8) = 0
close(9) = 0
close(10) = 0
exit_group(-1) = ?
Revision history for this message
|
#6 |
Which OS are you using, how did you install and configure the LXC.
Revision history for this message
|
#7 |
Ubuntu server 12.4 and made my install following this :
https:/
Revision history for this message
|
#8 |
Which version of lxc are you using, what is the output of command:
apt-get policy lxc
it looks like the the output of lxc-checkconfig is:
Cgroup clone_children flag: enabled.
Can you try:
sudo apt-get install lxc
sudo lxc-create -t ubuntu -n my-container
sudo lxc-start -n my-container
Does it works, you may have some configuration problem and not related to Cgroup.
Revision history for this message
|
#9 |
Yep, fresh re-install and everything's ok.
Thanks
Revision history for this message
|
#10 |
not for me. I reinstalled but still getting the problem and output of the lxc-checkconfig shows:
root@ip-
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /boot/config-
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled
--- Control groups ---
Cgroup: enabled
Cgroup namespace: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
any ideas?