[HOWTO] Using Linux Containers on Odroid (LXC)

Post Reply
User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

[HOWTO] Using Linux Containers on Odroid (LXC)

Post by mad_ady »

You've gone ahead and bought an Odroid and you like it. Wouldn't you want more? Maybe you need an isolated system for testing, or to run multiple instances of some software. Maybe you want to run various network tests and need to simulate multiple independent clients. Well, if processing power is not an issue for you, then Linux Containers (inspired actually from Solaris) can do the job well on your Odroid.

How it works

LXC is a lightweight “virtualization” method to run multiple virtual units (containers, similar to “chroot”) simultaneously on a single control host. Containers are isolated with Kernel Control Groups (cgroups) and Kernel Namespaces.

LXC provides an operating system-level virtualization where the Kernel controls the isolated containers. With other full virtualization solutions like Xen, KVM, or libvirt the processor simulates a complete hardware environment and controls its virtual machines.

Image

Conceptually, LXC can be seen as an improved chroot technique. The difference is that a chroot environment separates only the file system, whereas LXC goes further and provides resource management and control via cgroups.

Benefits of LXC
  • Isolating applications and operating systems through containers.
  • Providing nearly native performance as LXC manages allocation of resources in real-time.
  • Controlling network interfaces and applying resources inside containers through cgroups.
Limitations of LXC
  • All LXC containers are running inside the host system's Kernel and not with a different Kernel.
  • Only allows Linux “guest” operating systems.
  • LXC is not a full virtualization stack like Xen, KVM, or libvirt.
  • Security depends on the host system. LXC is not secure. If you need a secure system, use KVM.
To install and use lxc, simply use apt-get to install the lxc package:

Code: Select all

$ sudo apt-get install lxc
Initialization
In order to create or operate linux containers, you'll need to be root (private containers can also be created by non privileged users, but to work well you need at least kernel 3.13 - the Ubuntu 15.04 image from HardKernel comes with 3.10). In addition to root, you'll also need to have some specific kernel configurations active (if you've built your own kernel). The default kernel from HardKernel contains all the necessary configuration to run lxc out of the box. To check that your system is ready for lxc, run the lxc-checkconfig command. If your kernel does not support lxc, see Odroid Magazine January 2015 issue to find out what you need to enable in the kernel's configuration.

To create a new container, you first need to setup an initial configuration file and to select a suitable template. The templates instruct LXC how to download the necessary packages for the distribution of your choice. In Ubuntu 15.04 you get these templates by default

Code: Select all

# ls /usr/share/lxc/templates/
lxc-alpine     lxc-centos    lxc-fedora        lxc-oracle  lxc-ubuntu-cloud
lxc-altlinux   lxc-cirros    lxc-gentoo        lxc-plamo
lxc-archlinux  lxc-debian    lxc-openmandriva  lxc-sshd
lxc-busybox    lxc-download  lxc-opensuse      lxc-ubuntu
Unfortunately, since you're not running an Intel platform, not all of them will work on our Odroids. To find out if your favorite distribution will run as a container, you need to investigate if they also provide an ARM build.

We will first create a new container for Fedora Linux. We want the network configuration to go through lxcbr0 which does NAT so we will setup the configuration like this:

Code: Select all

# cat fedora.conf 
lxc.utsname = fedoracontainer
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.name = eth0
The configuration simply specifies that the container will be called fedoracontainer internally (the hostname), networking is bridged to lxcbr0 and the internal network interface name is eth0. Unfortunately, the template for Fedora is a bit out of date and will fail by default, so you'll need to correct some mirror paths:

Code: Select all

# sed -i 's/mirrorurl="mirrors.kernel.org::fedora"/mirrorurl="mirrors.kernel.org::archive\/fedora-archive"/' /usr/share/lxc/templates/lxc-fedora 
To create the container, issue this command:

Code: Select all

# lxc-create -t /usr/share/lxc/templates/lxc-fedora -f fedora.conf -n fedoracontainer -- --release 23
Here, -t specifies the template to be used, -f points to the configuration file we've just created and -n sets the container's name. The -- switch informs lxc-create to pass any additional parameters to the template (which is a bash script), and we're asking for Fedora 23. The bootstrap script will take care and download a "livecd" version of Fedora 20 and use it to install a Fedora 23 minimal image. The whole process may take a while.

After the container is created, you can safely delete the bootstrap and cache if you don't plan on installing other fedora-based containers soon:

Code: Select all

# rm -rf /var/cache/lxc/fedora/armhfp/bootstrap
# rm -rf /var/cache/lxc/fedora/armhfp/LiveOS
Right now, the container is shut down and stores its files (including the container config) under /var/lib/lxc/fedoracontainer/ taking up 657M for the minimal install.

How about trying out Ubuntu 15.10 as a container? I've heard there are still problems if you run it as a main operating system on Odroid, but let's have a look. First, prepare the initial config file. It's similar to Fedora's, but this time we want the container to be bridged to eth0, so we'll need to create a bridge interface connected to eth0 which we'll call brlan0.

Changing your wired network connection to a bridge interface can be a bit tricky if you are doing this remotely over the network. The best way to do it and have persistency across reboots is to add this config to /etc/network/interfaces and reboot your Odroid:

Code: Select all

auto brlan0
iface brlan0 inet dhcp
   bridge_ports eth0
Note that the brlan0 interface will become the layer 3 interface in your system (and obtain an IP address), and eth0 will be just a layer 2 switch port. Also, changing the network configuration might break processes where the interface is specified by name (such as iptables, arpwatch, munin, etc).

Once the bridge interface is up and running (e.g. you have rebooted your Odroid), use this configuration to prepare the container:

Code: Select all

# cat ubuntu.conf 
lxc.utsname = ubuntucontainer
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = brlan0 
lxc.network.name = eth0
# lxc-create -t /usr/share/lxc/templates/lxc-ubuntu -f ubuntu.conf  -n ubuntucontainer -- --release wily 
The 10.15 minimal install takes up just 326MB.

If you want to bridge to your wireless adapter, the bad news is that you can't (http://serverfault.com/questions/152363 ... n0-to-eth0). This is roughly because the wireless driver can create multiple logical interfaces (such as wlan0) and you can't move the logical interface in a different namespace without moving the whole network card. However, lxc provides a mechanism to detach the whole network card from your host system and attach it to a running container:

Code: Select all

# lxc-device -n container-name add wlan0
Image

Once the wifi card has been attached to the container, it will no longer be visible in the host OS, so you'd better have an alternate way of connecting to it.

Starting and stopping
Now that you have two containers, it's time to start them up. This can be done with the following command:

Code: Select all

# lxc-start -n fedoracontainer -d
The -d switch tells the command to start the container in the background, otherwise it would attach your terminal to its console and killing the terminal would also terminate the container. If you are having problems starting your container up, remove -d to follow the boot messages. To attach to the container and do some actual work, use lxc-attach:

Code: Select all

# lxc-attach -n fedoracontainer
[root@fedoracontainer ~]#
You can attach before the container has had time to fully start, so some services (such as network) might not be available immediately. Simply wait for the container to fully start (you should have some getty process in your process list). Now, if you take a peek inside, you'll see just a few processes running. You can now use yum to install your favourite packages, as if the system was running on its own hardware.

Image

To exit the container (without stopping it), you can simply type exit at the prompt. You can also access the container via ssh from the host via the internal network.

To turn off a container you can issue the lxc-stop command:

Code: Select all

# lxc-stop -n fedoracontainer
If you want your container to be started together with the system, you can enable the auto startup feature by modifying the container's configuration located at /var/lib/lxc/fedoracontainer/config and add the following lines:

Code: Select all

lxc.start.auto = 1
lxc.start.delay = 10
Now, lxc-ls will show you if it is scheduled for autostart:

Code: Select all

# lxc-ls --fancy
NAME             STATE    IPV4  IPV6  GROUPS  AUTOSTART  
-------------------------------------------------------
fedoracontainer  STOPPED  -     -     -       YES        
ubuntucontainer  STOPPED  -     -     -       NO
To get additional info about your running container, you can also use

Code: Select all

# lxc-info -n fedoracontainer
Name:           fedoracontainer
State:          RUNNING
PID:            24396
IP:             10.0.3.186
CPU use:        41.87 seconds
Memory use:     15.09 MiB
Link:           vethTSW172
 TX bytes:      3.27 KiB
 RX bytes:      28.89 KiB
 Total bytes:   32.16 KiB
If the command line is not your favourite environment (why are you still reading this then?), you can also manage your containers from a nifty web interface called lxc-webpanel: https://lxc-webpanel.github.io/install.html. Follow the instructions in the link to install it and you can access it at http://your-odroids-ip:5000/. There you can do most of the tasks already presented and some of the advanced topics.

Image

Advanced topics

The configuration shown before will get you started with lxc without adding too much complexity to your setup. However, containers have a lot of flexibility in terms of your control of resource allocation that we will briefly discuss now.

Disk space
The containers you've just created use a directory on the filesystem to store their rootfs. While this is simple to implement and understand, it provides medium I/O performance. Other options include a lvm block device, a loop block device (which can be a file or a physical storage device), brtfs filesystem or zfs. These allow you to specify a maximum size to be used and also, brtfs and zfs offer features for snapshots, deduplication and fast cloning (copy-on-write). If needed you can also limit the amount of I/O operations that the container is allowed to make in order not to starve other containers or the host.

Memory
To list the currently used memory of a running container, you can run this command:

Code: Select all

# cat /sys/fs/cgroup/memory/lxc/ubuntucontainer/memory.usage_in_bytes
By default, the container will be able to use the whole system memory. If that's not what you want, you can limit the memory by doing:

Code: Select all

# lxc-cgroup -n ubuntucontainer memory.limit_in_bytes 40M
# cat /sys/fs/cgroup/memory/lxc/ubuntucontainer/memory.limit_in_bytes
41943040
The changes will reflect immediately in your running container:

Code: Select all

root@ubuntucontainer:~# free -m
             total       used       free     shared    buffers     cached
Mem:            40         31          8         31          0         23
-/+ buffers/cache:          7         32
Swap:            0          0          0
If you go over the memory limit, the kernel will try to lose some caches, but in the end, if there's no more memory you'll see processes dying with "Cannot allocate memory" errors.

Code: Select all

root@ubuntucontainer:~# mount -t tmpfs -o size=50m tmpfs /mnt/ramdisk3
root@ubuntucontainer:~# dd if=/dev/zero of=/mnt/ramdisk3/1
dd: writing to '/mnt/ramdisk3/1': Cannot allocate memory
Alternatively, you can add the memory limit directly in the container's configuration by doing:

Code: Select all

lxc.cgroup.memory.limit_in_bytes = 40M
CPU
You can set specific CPU cores to a container, or allocate a number of CPU shares to that container to restrict CPU usage (by default each container gets 1024 shares):

Code: Select all

# cat /sys/fs/cgroup/cpu/lxc/ubuntucontainer/cpu.shares
1024
# echo 256 > /sys/fs/cgroup/cpu/lxc/ubuntucontainer/cpu.shares
# cat /sys/fs/cgroup/cpu/lxc/ubuntucontainer/cpu.shares
256
To set it in the container's configuration, add these directives:

Code: Select all

lxc.cgroup.cpuset.cpus = 1,2
lxc.cgroup.cpu.shares = 256
Kernel modules
In order to use specific kernel modules inside a LXC container, you first need to load that module on the host (e.g. for iptables).

Special files
Similar to the special configuration needed to attach a wifi interface to a running LXC, you can bind special files from the host to be used exclusively by the container. For instance, to be able to use a USB-to-Serial adapter in the container you could run this command in the host:

Code: Select all

# lxc-device add -n ubuntucontainer /dev/ttyUSB0 /dev/ttyS0

Use cases

Containers can be useful as test systems where you can experiment without the fear of breaking things. You can give root access to your friends and share multiple independent environments on top of the same hardware.
I learned how to use LXC and went ahead and bought a few Odroids in order to conduct network tests using multiple NICs from multiple locations. My employer was running multiple Smokeping slave instances over multiple providers to measure website response time, Youtube video download and Speedtest.net results from two independent containers running on Odroid. The need for containers allowed us to use bridged networking to access remote resources via both links simultaneously (keep different routing tables). Because the application doesn't need a lot of CPU/Memory, the Odroids were perfect for the job! My plan for the future is to get Android running inside a container - apparently it's not impossible: https://www.stgraber.org/2013/12/23/lxc ... ner-usage/, or even OpenWRT to have a router on a stick.

References:
https://www.suse.com/documentation/sles ... start.html
https://www.flockport.com/lxc-advanced-guide/

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by mad_ady »

I have posted the LXC article. If you use other containers please let me know what works on Odroid. Currently I've only tested Ubuntu and Fedora.

yangwoo
Posts: 6
Joined: Thu May 09, 2013 7:32 am
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by yangwoo »

Hello mad_ady.
I'm trying to test working ubuntu and android simultaneously on Odroid board.
But I have no information for that. Still I'm not sure, it is possible or not.
(In google, very few articles are showed. It says just may possible...)
Can you share more information about that if you know?
First of all, I don't know what is better idea where start point is ubuntu linux or android linux...

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 60 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by memeka »

you need virtual machine for that, not LXC

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by mad_ady »

In theory it might work with lxc. You've probably seen this guide: https://www.stgraber.org/2013/12/23/lxc ... ner-usage/

So, the main problems are:
1. Getting android's kernel to boot ubuntu, or build a linux kernel that has all the bits that android needs
2. Copy android's rootfs under /var/lib/lxc/android/rootfs and recreate the filesystem (premount /system, /data, etc)
3. Modify android's boot scripts to be more sensitive - for instance when you shutdown android it will shut down the host as well.

I have no idea what happens when the ui tries to start. Can you also run an X server in ubuntu? Probably the kernel config will cripple some ubuntu functionality.

Somebody with experience in both kernels (are they even based on the same source?) could tell us what to expect.

User avatar
rooted
Posts: 9553
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 761 times
Been thanked: 497 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by rooted »

yangwoo wrote:Hello mad_ady.
I'm trying to test working ubuntu and android simultaneously on Odroid board.
But I have no information for that. Still I'm not sure, it is possible or not.
(In google, very few articles are showed. It says just may possible...)
Can you share more information about that if you know?
First of all, I don't know what is better idea where start point is ubuntu linux or android linux...
memeka wrote:you need virtual machine for that, not LXC
This does it (VolksPC)

http://forum.odroid.com/viewtopic.php?f=111&t=14374

yangwoo
Posts: 6
Joined: Thu May 09, 2013 7:32 am
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by yangwoo »

Right. I saw that article.
And I also mentor graphics solution in automotive side. It look possible, but I'm afraid that if there are big modification.
If it is required big effort, I don't want it... for example, create new layer for hybrid work(native linux, android)

Below pdf include mentor's LXC architecture .
http://www.mentorg.com.cn/download/pdf/ ... system.pdf

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 60 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by memeka »

you can always run android and install ubuntu in chroot...

yangwoo
Posts: 6
Joined: Thu May 09, 2013 7:32 am
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by yangwoo »

Really? Is it simple? If that it is good news for me.
I like to more question about graphic layer.
If I have two display panel for embedded board, for example HDMI is for android app, LCD is for ubuntu graphical app.
Is it possible to operation this two display simultaneously?

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by mad_ady »

Not sure if android supports multiple displays, but if it does, you could interact with the linux instance (the one running in a chroot) through a VNC connection. Basically you view the VNC client from android. See this app and others like it: https://play.google.com/store/apps/deta ... roid&hl=en

yangwoo
Posts: 6
Joined: Thu May 09, 2013 7:32 am
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by yangwoo »

Yes, I saw that example of android app...
But I'm afraid about performance with VNC..
I did something with native linux on multi display supported board(In this case... no odroid board)
Both display show linux graphical application(include video play) now. But I want run android application
on second display without performance issue. So I'm trying to check using odroid board now.
I don't know what is best way to operate two display on difference platform.
As I said, Mentor graphics already did it(http://www.mentorg.com.cn/download/pdf/ ... system.pdf)

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by mad_ady »

Odroid XU3 had dual display support - HDMI and Display Port, but it's no longer being sold.
Anyway, I don't know if you can allow the second display to be used by a different OS in a LXC (I'm not talking about android specifically - for instance have Display 1 with an X server running on a host and display 2 with a different X server in the LXC). The problem is I think there's a single video driver that supports both outputs, so you can't split it between OSes (correct me if I'm wrong). You could run something like xnest or Xephyr and have the other OS output video to that virtual display instead. Since they are on the same machine networking shouldn't be an issue, but I'm not sure if you'd have EGL acceleration inside Xephyr. Again, getting android to output anything that looks like X11 so it could run inside Xephyer doesn't seem to be possible...

dongha28
Posts: 4
Joined: Tue Sep 02, 2014 11:12 pm
languages_spoken: English
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by dongha28 »

Hi, I am trying to create a Debian container on an ODROID-C2 running DietPi (Debian Stretch)
and I keep getting the following error:

root@Debodroid:/var/lib/lxc# lxc-create -t debian -n test
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/debian/rootfs-stable-aarch64 ...
Downloading debian minimal ...
I: Retrieving InRelease
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 067E3C456BAE240ACEE88F6FEF0F382A1A7B6500)
E: Invalid Release file, no entry for main/binary-aarch64/Packages
Failed to download the rootfs, aborting.
Failed to download 'debian base'
failed to install debian
lxc-create: lxccontainer.c: create_run_template: 1297 container creation template for test failed
lxc-create: tools/lxc_create.c: main: 318 Error creating container test

How do I fix this error? It says that I have an Invalid release file...

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by mad_ady »

Most likely the debian template points to an old url. You may need to manually fix it under /usr/share/lxc*

dongha28
Posts: 4
Joined: Tue Sep 02, 2014 11:12 pm
languages_spoken: English
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by dongha28 »

mad_ady wrote:Most likely the debian template points to an old url. You may need to manually fix it under /usr/share/lxc*
Thanks for the quick reply, I managed to get around this problem by specifying a mirror like 'sudo MIRROR=http://httpredir.debian.org/debian lxc-create -n test-cont -t /usr/share/lxc/templates/lxc-debian -- -r stretch -a arm64'.

dongha28
Posts: 4
Joined: Tue Sep 02, 2014 11:12 pm
languages_spoken: English
Has thanked: 0
Been thanked: 0
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by dongha28 »

I'm having another problem, this time a bit more complicated...
I managed to get the container 'installed' by using a command like 'sudo MIRROR=http://httpredir.debian.org/debian lxc-create -n test-cont -t /usr/share/lxc/templates/lxc-debian -- -r stretch -a arm64' but when I try to start the container on my ODROID-C2's running Debian Stretch (DietPi) with the 3.16 kernel, I get several error messages.
How do I get around this? Do I need a newer kernel? My ODROID-HC1's with the same linux distro as the C2's with the 4.14 kernel have no problems.

lxc-start 20180624125212.113 ERROR lxc_cgfsng - cgroups/cgfsng.c:create_path_for_hierarchy:1306 - Path "/sys/fs/cgroup/systemd//lxc/test-cont" already existed.
lxc-start 20180624125212.113 ERROR lxc_cgfsng - cgroups/cgfsng.c:cgfsng_create:1363 - No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/test-cont: No such fil$
lxc-start 20180624125212.281 ERROR lxc_apparmor - lsm/apparmor.c:apparmor_process_label_set:234 - No such file or directory - failed to change apparmor profile to lxc-container-defa$
lxc-start 20180624125212.282 ERROR lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 5)
lxc-start 20180624125212.282 ERROR lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "test-cont".
lxc-start 20180624125212.283 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/test-cont-1
lxc-start 20180624125212.284 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/test-cont-1
lxc-start 20180624125212.284 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/test-cont-1
lxc-start 20180624125212.284 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/test-cont-1
lxc-start 20180624125212.285 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/test-cont-1
lxc-start 20180624125212.285 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/test-cont-1
lxc-start 20180624125212.286 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/test-cont-1
lxc-start 20180624125212.286 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/test-cont-1
lxc-start 20180624125212.286 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/debug//lxc/test-cont-1
lxc-start 20180624125212.286 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/test-cont-1
lxc-start 20180624125212.286 ERROR lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/test-cont-1
lxc-start 20180624125217.288 ERROR lxc_start_ui - tools/lxc_start.c:main:366 - The container failed to start.
lxc-start 20180624125217.288 ERROR lxc_start_ui - tools/lxc_start.c:main:368 - To get more details, run the container in foreground mode.
lxc-start 20180624125217.288 ERROR lxc_start_ui - tools/lxc_start.c:main:370 - Additional information can be obtained by setting the --logfile and --logpriority options.

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: [HOWTO] Using Linux Containers on Odroid (LXC)

Post by mad_ady »

Run sudo lxc-checkconfig and see what's missing. Here is the output on 3.14 on C2 with working docker support. Some kernel option might be missing... http://paste.ubuntu.com/p/xjRm6pyjTj/

Though I installed on Friday Ubuntu 18.04 with 3.16 on C2 and successfully deployed a new 18.04 container.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 4 guests