This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

linux container (lxc) on arm

Hi,

I am trying to port LXC on arm(beagleboard) board.

I am using kernel 3.12, I have enable the cgroup & namespace configuration in kernel.

I am able to successfully execute the "lxc-execute" on board.

I thought I successfully created a busybox container using existing template lxc-busybox file; because I am able to see the new container created under /var/lib/lxc directory.

But when I am trying to start the container using "lxc-start", the command fails with following log:

lxc-start 1414573403.555 WARN lxc_log - log.c:lxc_log_init:316 - lxc_log_init called with log already initialized
lxc-start 1414573403.559 WARN lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuset unknown to /var/lib/lxc bb
lxc-start 1414573403.559 WARN lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpu unknown to /var/lib/lxc bb
lxc-start 1414573403.559 WARN lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuacct unknown to /var/lib/lxc bb
lxc-start 1414573403.559 WARN lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup memory unknown to /var/lib/lxc bb
lxc-start 1414573403.560 WARN lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup freezer unknown to /var/lib/lxc bb
lxc-start 1414573403.560 WARN lxc_cgfs - cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup devices unknown to /var/lib/lxc bb
lxc-start 1414573403.569 INFO lxc_start - start.c:lxc_check_inherited:221 - closed inherited fd 4
lxc-start 1414573403.587 DEBUG lxc_start - start.c:setup_signal_fd:259 - sigchild handler set
lxc-start 1414573403.587 INFO lxc_start - start.c:lxc_init:451 - 'bb' is initialized
lxc-start 1414573403.597 INFO lxc_start - start.c:lxc_check_inherited:221 - closed inherited fd 4
lxc-start 1414573403.602 INFO lxc_monitor - monitor.c:lxc_monitor_sock_name:177 - using monitor sock name lxc/ad055575fe28ddd5//var/lib/lxc
lxc-start 1414573403.602 ERROR lxc_monitor - monitor.c:lxc_monitor_open:208 - connect : backing off 10
lxc-start 1414573403.608 DEBUG lxc_start - start.c:__lxc_start:1130 - Not dropping cap_sys_boot or watching utmp
lxc-start 1414573403.609 INFO lxc_cgroup - cgroup.c:cgroup_init:65 - cgroup driver cgroupfs initing for bb
lxc-start 1414573403.613 ERROR lxc_monitor - monitor.c:lxc_monitor_open:208 - connect : backing off 50
lxc-start 1414573403.650 INFO lxc_conf - conf.c:mount_autodev:1131 - Mounting /dev under /home/prav/lxc/lxc-1.1.0/build/lib/lxc/rootfs
lxc-start 1414573403.650 WARN lxc_conf - conf.c:mount_autodev:1142 - No /dev on container rootfs.
lxc-start 1414573403.651 WARN lxc_conf - conf.c:mount_autodev:1143 - Proceeding without autodev setup
lxc-start 1414573403.651 INFO lxc_conf - conf.c:fill_autodev:1198 - Creating initial consoles under /home/pravlxc/lxc-1.1.0/build/lib/lxc/rootfs/dev
lxc-start 1414573403.652 ERROR lxc_conf - conf.c:setup_dev_symlinks:946 - No such file or directory - Error creating /home/prav/lxc/lxc-1.1.0/build/lib/lxc/rootfs/dev/fd
lxc-start 1414573403.652 ERROR lxc_conf - conf.c:lxc_setup:3862 - failed to setup /dev symlinks for 'bb'
lxc-start 1414573403.653 ERROR lxc_start - start.c:do_start:699 - failed to setup the container
lxc-start 1414573403.653 ERROR lxc_sync - sync.c:__sync_wait:51 - invalid sequence number 1. expected 2
lxc-start 1414573403.669 ERROR lxc_monitor - monitor.c:lxc_monitor_open:208 - connect : backing off 100
lxc-start 1414573403.672 ERROR lxc_start - start.c:__lxc_start:1157 - failed to spawn 'bb'
lxc-start 1414573403.771 ERROR lxc_monitor - monitor.c:lxc_monitor_open:213 - connect : Connection refused
lxc-start 1414573403.772 ERROR lxc_start_ui - lxc_start.c:main:344 - The container failed to start.
lxc-start 1414573403.772 ERROR lxc_start_ui - lxc_start.c:main:346 - To get more details, run the container in foreground mode.
lxc-start 1414573403.772 ERROR lxc_start_ui - lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.

Please help me understand the problem.

Thanks & Regards,

Prav

  • Hi Prav,

    Please see the:
    Documentation/scheduler/sched-design-CFS.txt
    Documentation/cgroups - needed files (cgroups.txt, ...)

    And give much more information how to reproduce from our side.
    BR
    Ivan
  • Hi Ivan,

    "Our objective is to boot android over linux container on beagleboard-xm".

    So, I have cross-compiled the lxc-1.1.0 utils.

    I have enabled the kernel configuration for cgroup & namespace as mentioned in following link:

    http://wiki.gentoo.org/wiki/LXC

    after that I have mounted the cgroup as follow:

    mount -t tmpfs cgroup_root /sys/fs/cgroup
    mkdir /sys/fs/cgroup/cpuset
    mkdir /sys/fs/cgroup/cpu
    mkdir /sys/fs/cgroup/cpuacct
    mkdir /sys/fs/cgroup/memory
    mkdir /sys/fs/cgroup/devices
    mkdir /sys/fs/cgroup/freezer
    mount -t cgroup cpuset -ocpuset /sys/fs/cgroup/cpuset
    mount -t cgroup cpu -ocpu /sys/fs/cgroup/cpu
    mount -t cgroup cpuacct -ocpuacct /sys/fs/cgroup/cpuacct
    mount -t cgroup memory -omemory /sys/fs/cgroup/memory
    mount -t cgroup devices -odevices /sys/fs/cgroup/devices
    mount -t cgroup freezer -ofreezer /sys/fs/cgroup/freezer

    Successfully, I used "lxc-execute" command to  run an application in container, using following command:

    "lxc-execute -n guest -P /var/lib/lxc -- sleep 6"

    Then I want to create a full-fledged linux inside a container. For that purpose I am using following command.

    "lxc-create -t /share/lxc/templates/lxc-busybox -n bb_container -P /var/lib/lxc --logfile /home/root/log_create.txt --logpriority info";  Since I am using busybox based arago filesystem so I used busybox template.

    after running above command, I can see that a container named "bb_container" is created under /var/lib/lxc directory.

    If I try to start the container I got the error(which I already mentioned in first postl). For starting the container I used following command:

    "lxc-start -n bb_container -f /var/lib/lxc/bb_container/config -P /var/lib/lxc/ --logfile /home/root/log_start.txt --logpriority info"

    Also I am successfully able to destroy the newly created  container "bb_container" using "lxc-destroy".

    So I feel lxc-utils are properly cross-compiled, but I don't have much idea regarding the templates, & configuration files which are used.  

    Thanks & Regards,

    Prav

  • Hi Prav,

    From packages.gentoo.org/.../lxc I saw that 1.1.0-r2 is not supported from arm. Could you try with other version. From other way it seems that all other is OK.

    BR
    Ivan