You may know that I really like LXC and the major problem when you want to use that solution in production is: how do you monitor memory and CPU? Regarding the CPU side, I do not have an easy answer for the moment :-(. However regarding the memory, I’ve made a Nagios/Naemon check which will check the memory (RAM) and SWAP of a container. Here is how to use it:
I’m using for my own servers LXC for about a year now. I’m still fed up about bugs introduced by the beta version of LXC (0.8b) present in Debian Wheezy. As now LXC project has released a stable version, I’ve looked at the Debian backports, but didn’t have any chance to find a newer version on it :-(. However, a version 1.0.4 exist on Debian Jessie. I took the Debian sources and recompiled them on Wheezy (available here).
I wanted to find a way to properly view resources (memory/CPU/IO) usages or configuration. For that I need to use cgroups. But the problem are on free, top, htop or common any tools, as they do not get the real informations of the container. We’re in fact waiting on a lot of work on the kernel side or systemd side. More information’s can be found here. Another solution that permit to bind a socks inside containers exists called CGManager, however classical tools doesn’t use it to get informations.
I recently migrated this server to a new one. New hardware, better performance, less power consumption etc…Thanks Online. I’m already using LXC on my home server and see the benefits for 8 months ago. That’s why I decided to migrate this server to LXC as well. The difference here is that I wanted to migrate my VM from KVM. All my KVM VM are on Debian Wheezy so that was pretty easy.
I’ve recently updated my LXC role for ansible. You can get it like that: ansible-galaxy install deimosfr.lxc Here is the change log: + Adding new parameters for dnsmasq and interfaces + Adding new prequesite to avoid unwanted modules to load in the latest kernel versions = Corrected networking configuration issue = Templates do not create @[email protected] folder anymore It works perfectly on my new Dedibox :-)
I’ve finally finished my documentation on LXC for Debian Wheezy. I think I’ve added the most interesting features. I’m now going to migrate my servers from KVM to LXC as I only POC it for now. I’ll keep you up to date when everything will be migrated.
As you can see, I write more and more posts on LXC. The latest thing I worked on, was how to convert a host/vm to a LXC container. I needed to write a script for it as I didn’t find what I needed. The script will remove unneeded elements in a Debian system, removing folders (dev,proc,sys), recreate devices and configure etc files. You can find more informations by following the link.
- OLDER POSTS
- page 1 of 2