LXC on CSS

Hello,

I’m trying to build a LXC server, based on CSS. I can install LXC without problems and even create a container, but I have one question and one problem:

Question: is there a Calculate template to use as a LXC container?

Problem: I’ve created a Gentoo container, but when I try to start a service like mysql or apache, I get the following error:

mkdir: cannot create directory ‘/sys/fs/cgroup/openrc/mysql’: Read-only file system (with apache it’s ‘/sys/fs/cgroup/openrc/apache2’ offcourse :wink: )

Any ideas?

Regards,

Angelo Machils

Hi Angelo,
Currently calculate templates do not support setting LXC. You can use the source for configuring LXC in Gentoo https://wiki.gentoo.org/wiki/LXC or http://gentoo-en.vfose.ru/wiki/LXC.

Hi,

There are no calculate linux template.
You must set-up gentoo and layman. After, add calculate layman.

But, i don’t know how to migrate a gentoo to calculate (to have binaries, the profile and other things).

Thanks

Hello,

Yes, there are no Calculate templates, shame. But I managed to get the servers working, albeit somewhat different: Calculate as base with Gentoo LXC. There are two major things to watch out for:

  • the manual on the Gentoo wiki doesn’t mention installing and running the cg-manager; without this you can create and start containers, but with certain actions you will get a warning that certain directories are write-protected.
  • you have to edit the Gentoo default config, because it will want to open/share certain host directories to the containers; this doesn’t work properly. Comment them out and it works …

Regards,

Angelo