Trying to setup LXC on a SLES 11 which is working as far as I’ve gotten at the moment. One thing keeps eluding me however, and that is having cgroups mount at boot.
Have added a line to /etc/fstab that reads:
none /cgroup cgroup defaults 0 0
But at boot, it isn’t mounted. Running mount manually (as root) with this command works fine:
Not to strong on SLES yet, but one thing that pops in mind with your post is that I don’t need it to mount it as tmpfs but as cgroup:
mount -t none cgroup /cgroup
Don’t know if there is any difference between SLES and OpenSuse on this part but since I am to use this for running LXC the available documentation for this states that mount point. On the part of mounting this at boot, I’ve only been able to find documentation for either Red Hat or Ubuntu which tells to add the command to etc/fstab so I was hoping that the same command would work on SLES (which it apparently didn’t).
On the subject of output from running the command manually, it doesn’t give any. I run the command as root, no output is given but when starting my LXC container it no longer whines about cgroups not being mounted. Hence my comment that it seems to be working when running it manually.
Check it’s start) section. It first checks and mounts /sys/fs/cgroup with
mount -t tmpfs tmpfs -o mode=755,nosuid,nodev,noexec /sys/fs/cgroup
and then the subfolders
mount -t cgroup -o nosuid,nodev,noexec,$name cgroup “$d”
Maybe you only need to enable this script in order to work.
Don’t know if there is any difference between SLES and OpenSuse on this part
There are a lot… opensuse 12.1 uses Systemd, while SLES uses sysvinit, for example.
[QUOTE=enovaklbank;4456]> Don’t know if there is any difference between SLES and OpenSuse on this part
There are a lot… opensuse 12.1 uses Systemd, while SLES uses sysvinit, for example.[/QUOTE]
And cgroups are only available/supported on SLES 11 starting SP2 IIRC?
update: scratch that, it’s containers LXC itself I was thinking of… Monday mornings…