I am new bee to LXC, I just installed the lxc and created the centos container from the lxc provided templates. It got created successfully without any error but
when I am starting the centos container it is failing with the following error message. Please help.
Following are the steps and error message
uname -a
Linux testnode1.compute.dec.in 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
lxc-create -n centos1 -t centos
lxc-start -n centos1
-----------------------------------------------------------------------------------------
start 1527235694.750 INFO lxc_start_ui - lxc_start.c:main:259 - using rcfile /var/lib/lxc/centos/config
lxc-start 1527235694.763 WARN lxc_log - log.c:lxc_log_init:331 - lxc_log_init called with log already initialized
lxc-start 1527235694.764 INFO lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver SELinux
lxc-start 1527235694.765 DEBUG lxc_conf - conf.c:lxc_create_tty:3829 - allocated pty '/dev/pts/1' (5/6)
lxc-start 1527235694.765 DEBUG lxc_conf - conf.c:lxc_create_tty:3829 - allocated pty '/dev/pts/2' (7/8)
lxc-start 1527235694.765 DEBUG lxc_conf - conf.c:lxc_create_tty:3829 - allocated pty '/dev/pts/3' (9/10)
lxc-start 1527235694.765 DEBUG lxc_conf - conf.c:lxc_create_tty:3829 - allocated pty '/dev/pts/4' (11/12)
lxc-start 1527235694.765 INFO lxc_conf - conf.c:lxc_create_tty:3840 - tty's configured
lxc-start 1527235694.765 DEBUG lxc_start - start.c:setup_signal_fd:263 - sigchild handler set
lxc-start 1527235694.765 DEBUG console - console.c:lxc_console_peer_default:438 - opening /dev/tty for console peer
lxc-start 1527235694.765 DEBUG console - console.c:lxc_console_peer_default:444 - using '/dev/tty' as console
lxc-start 1527235694.765 DEBUG console - console.c:lxc_console_sigwinch_init:144 - 2508 got SIGWINCH fd 17
lxc-start 1527235694.765 DEBUG console - console.c:lxc_console_winsz:71 - set winsz dstfd:14 cols:124 rows:49
lxc-start 1527235694.765 INFO lxc_start - start.c:lxc_init:463 - 'centos' is initialized
lxc-start 1527235694.766 DEBUG lxc_start - start.c:__lxc_start:1122 - Dropping cap_sys_boot
lxc-start 1527235694.771 DEBUG lxc_conf - conf.c:instantiate_veth:3140 - instantiated veth 'vethE27QSD/vethM29FKW', index is '10'
lxc-start 1527235694.771 INFO lxc_cgroup - cgroup.c:cgroup_init:62 - cgroup driver cgroupfs initing for centos
lxc-start 1527235694.772 ERROR lxc_cgfs - cgfs.c:handle_cgroup_settings:2153 - Device or resource busy - failed to set memory.use_hierarchy to 1; continuing
lxc-start 1527235694.772 ERROR lxc_cgfs - cgfs.c:handle_cgroup_settings:2153 - Device or resource busy - failed to set memory.use_hierarchy to 1; continuing
lxc-start 1527235694.777 ERROR lxc_start - start.c:lxc_spawn:928 - No such file or directory - Failed to preserve requested namespaces: Kernel does not support setns.
lxc-start 1527235695.031 ERROR lxc_start - start.c:__lxc_start:1149 - failed to spawn 'centos'
lxc-start 1527235695.031 ERROR lxc_start_ui - lxc_start.c:main:336 - The container failed to start.
lxc-start 1527235695.031 ERROR lxc_start_ui - lxc_start.c:main:340 - Additional information can be obtained by setting the --logfile and --logpriority options.
-----------------------------------------------------------------------------------------
Please let me know if any other information iis required.
I mean, how crucial is it that you use the 2.6.32 kernel? If it’s critical I can backport the LXC 3.0 logic got stable-1.0 which should allow you to run container’s without the use of setns().
Please show me the container’s config file. Note that even with my changes you will not be able to share namespaces since your kernel doesn’t support this.
@nis, please try to build with the patches in this branch https://github.com/lxc/lxc/pull/2356 applied and see if that unblocks you. This is what we’re going to backport.
updates: centos-hn.viettelidc.com.vn
No Packages marked for Update
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
0 package files removed
Update finished
Copy /var/cache/lxc/centos/x86_64/6/rootfs to /var/lib/lxc/centos-1/rootfs …
Copying rootfs to /var/lib/lxc/centos-1/rootfs …
Storing root password in '/var/lib/lxc/centos-1/tmp_root_pass’
Expiring password for user root.
passwd: Success
Container rootfs and config have been created.
Edit the config file to check/enable networking setup.
The temporary root password is stored in:
'/var/lib/lxc/centos-1/tmp_root_pass'
The root password is set up as expired and will require it to be changed
at first login, which you should do as soon as possible. If you lose the
root password or wish to change it without starting the container, you
can change it from the host by running the following command (which will
also reset the expired flag):