Containers on android

16 views
Skip to first unread message

Manoj Gudi

unread,
Mar 31, 2013, 12:20:00 PM3/31/13
to linux_o...@googlegroups.com
Is it possible to have linux containers using LXC or Openvz in android?

Host:  Android OS
Guest:  Debian or Ubuntu

This would solve issue with chroot (i.e. better device access inside a container) since any linux container provides namespace isolation of sysfs too.

Plus the usual benefits of running linux containers (low resource utilization etc..)

Any thoughts?

isachin

unread,
Mar 31, 2013, 1:31:13 PM3/31/13
to Manoj Gudi, linux_o...@googlegroups.com
Yes, we can surely have one of these containers. From what I read, the advantages are, they provide more isolation than 'chroot' plus they also provides an optional kernel. Coming to 'sysfs' isolation, this is useful if we have host as linux, but in our case we have Android.

Regarding resource utilization, I haven't got any solid documentation.

Our 'chroot' env is sufficient for our need. I don't see linux containers will make any huge differences. They are mainly intended for kernel development as compared to application testing for chroot.

If you still want to try, please go ahead. At-least we will come you know the difference between performance. 


--
You received this message because you are subscribed to the Google Groups "Linux-on-Aakash" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux_on_aaka...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Sachin

Pranav

unread,
Mar 31, 2013, 1:31:44 PM3/31/13
to Manoj Gudi, linux_o...@googlegroups.com
I think that the issue of Rooting sill floats here as for Running A VM you need to have some changes in the kernel drivers (you guys must know this better) so basically you run the risk of (what ever risks come with rooting) and also it is a bit more experimental as you may end up screwing your devices battery (one of the side effects even my laptop has succumbed to !!!), its other components .... so please think twice before you try it or if you have a sponsor or too many devices. (can you spare me one ;))

Regards,
Pranav


On Sun, Mar 31, 2013 at 9:50 PM, Manoj Gudi <manoj....@gmail.com> wrote:

--

Manoj Gudi

unread,
Mar 31, 2013, 1:37:30 PM3/31/13
to isachin, linux_o...@googlegroups.com
On Sun, Mar 31, 2013 at 11:01 PM, isachin <iclco...@gmail.com> wrote:
Yes, we can surely have one of these containers. From what I read, the advantages are, they provide more isolation than 'chroot' plus they also provides an optional kernel. Coming to 'sysfs' isolation, this is useful if we have host as linux, but in our case we have Android.

Regarding resource utilization, I haven't got any solid documentation.

Our 'chroot' env is sufficient for our need. I don't see linux containers will make any huge differences. They are mainly intended for kernel development as compared to application testing for chroot.


I don't get proper access to devices like camera in a chroot system (my pain point), also its constrained to some bit, my experience says any system upgrades in chroot results WILL BREAK it

Also the fact that containers provide Check-point Restore ability (its work in progress) which is kind of hibernation or a snapshot in "vm" terms

Now implementing this is tricky since I dont know if android kernel has support for cgroups and lxc (since essentially android kernels are more or less just RT patched kernels) 

Manoj Gudi

unread,
Apr 1, 2013, 12:50:15 AM4/1/13
to linux_o...@googlegroups.com

> After all its possible to some extent
>
> code.google.com/p/seek-for-android/wiki/AndroidContainer

Pranav

unread,
Apr 1, 2013, 1:57:40 AM4/1/13
to Manoj Gudi, linux_o...@googlegroups.com
well, it is possible to run VM's , what do you think JVM is? But it depends exactly how deep that VM is goign to dig in !!!

Regards,
Pranav

Manoj Gudi

unread,
Apr 1, 2013, 4:48:01 PM4/1/13
to Pranav, linux_o...@googlegroups.com
As strange and pointless it may sound, lxc works on aakash
<lxc-checkconfig.png>

The attachment is just a check config built using proper config files... 
I chose lxc since lxc is in mainline kernel(openvz requires to patch our kernel), and even our sunxi kernel has support for it. Without sufficient support checkconfig would have failed
 
I have downloaded ubuntu-armhf image files and have to build a rootfs, but again there's all reason to believe lxc can run on this. 
lxc-checkconfig.png

Pranav

unread,
Apr 1, 2013, 10:34:23 PM4/1/13
to Manoj Gudi, linux_o...@googlegroups.com
nice ... what about driod? I said it will work on ARM ....

Regards,
Pranav

Manoj Gudi

unread,
Apr 1, 2013, 10:54:23 PM4/1/13
to Pranav, linux_o...@googlegroups.com

I don't find lxc to be in mainline android kernel

Also openvz has patches for 2.6.35.7(last kernel for ginger bread)  which we cannot use for aakash (it requires 3.0.x)

So I don't see any solution for this.

Pranav

unread,
Apr 1, 2013, 10:58:20 PM4/1/13
to Manoj Gudi, linux_o...@googlegroups.com
k, I told you that you need to change a few of kernel headers/files for enabling LXC ... although you can take this as an task or goal to achieve.
At OpenStack the best way to learn something as vast as OS is to take an entry level bug, feature to implement or something similar and try to solve it - this is the most successful beginners class for OpenStack ....
You could apply the same philosophy as you will get to learn the kernel and virtualization with having something incredibly challenging and awesome to do along with it.

Regards,
Pranav
Reply all
Reply to author
Forward
0 new messages