Network and Filesystem Isolation with LXC and virtenv

For my memory comparison of light Linux desktops I needed a tool that would allow me to install on my computer about 20 window managers/desktop environments. After looking at several common virtualization packages, I ended up using Linux containers and virtenv for the job.

LXC and virtenv

Probably the best way to describe virtenv is as a graphic interface for Linux containers utilities developed and distributed by LXC project. Linux containers is the virtualization technology build into Linux kernel, available in any kernel after 2.6.32.

The virtual machines (VM) are driven without any overhead by the kernel already running on the computer. You don’t need to run a different kernel in the virtual machine, run only the processes you need, without even going trough the regular SysV or Linux init. This all means that memory is used very conservatively. For example, on a 1GB RAM computer you can run easily 10 SSH/DHCP servers, or 10 different xorg/X11 servers with LXDE window managers on top.

Continue reading

A Memory Comparison of Light Linux Desktops – Part 2

In my previous article I’ve tried to investigate the RAM memory requirements for running some of the most common light window managers and desktop environments available in the Linux world. Prompted by several readers, I’ve decided to include also the big, well-known memory hogs that grab most of the Linux market, i.e. KDE, Unity and Gnome.

I am using the same setup, based on virtenv. It includes its own xserver (Xephyr) and a virtualization container (LXC). The computer is an older 64-bit machine, running Ubuntu 12.04 with LXDE as desktop environment.

Continue reading

A Memory Comparison of Light Linux Desktops

After I install a new version of Linux, I usually take a good look at the screen. Does it have a task bar? Can I find my window after it was minimized? The direction some desktops are going is not clear. Making it easier for current users or for the people coming from Windows or Mac is not a goal anymore. User complains are dismissed, chalking it up to the fact that people don’t like change.

Fortunately, in Linux we have plenty of other choices, and we do like change. We have no need to keep using desktops we don’t like.

I will describe some of choices in this article, and I’ll attempt to measure the RAM memory requirements. I use free command in an xterm before and after the graphic environment is started on a separate X server (Xephyr). free command prints on the screen data made available by Linux kernel. The kernel knows at any moment how much memory is using and how many buffers are available.

Continue reading

SNMP MIB Browser on Ubuntu Workstation

Updated on June 2, 2013

Ubuntu Linux is arguably the most popular Linux distribution today. Well designed and easy-to-use as a desktop, it is also an excellent choice for any kind of server infrastructure in datacenters. In fact, according to W3Tech, Ubuntu server is right now in the second position and growing fast as a webserver.

In a previous article I looked at installing a basic network router using RCP100 on a Ubuntu 12.04 computer. Today, I will take a look at using Ubuntu for some more serious SNMP work.

Continue reading

RCP100 Basic Router Configuration on Ubuntu 12.04

I do like the idea of an open-source software router, and I’ve tried several of them so far. Most open-source routers would concentrate on implementing the main IP routing protocols one by one. Administration features like CLI or SNMP seem to get less attention. There is little or no support for integrated Access Control Lists, NTP, DHCP or DNS functionality. This is in sharp contrast with the commercial routers where administration and network management are first class citizens.

RCP100 seems to break the tradition. It has a Cisco-like command line interface (CLI), and all the regular administration and management protocols. Starting with version 0.99 it also features a simple and intuitive web interface, making the router accessible to less sophisticated users and beginner administrators.

In this article I will set up a basic RCP100 IP router on a Ubuntu 12.04 computer using the web interface. This means there will be lots of pictures and no CLI commands. Networking experts will definitely get bored.

Continue reading

Ubuntu Cleanup

I’ve recently installed Ubuntu 12.04 Long Term Support (LTS). The main advantage of a LTS distribution is that once you clean it up, it stays like that for two years.

Unity

First step is to switch your desktop to LXDE, unless you like Unity or Gnome the Third. The recommended way is to install Lubuntu, in my case I will install LXDE on top of regular Unity. If you already have regular Ubuntu installed, it would be too much trouble to start downloading and installing everything. Also keep in mind that Lubuntu is not a LTS release, and the applications installed are different, for example Goolge Chromium instead of Mozilla Firefox, or Gnumeric instead of LibreOffice Calc. LXDE is such a small desktop component, it might be a better idea to chose your distro based on the applications it provides and switch the default desktop environment to LXDE.

$ sudo apt-get install lxde

Continue reading

ezchroot

ezchroot is a small script to chroot into OpenVZ containers. Once inside, you can update or modify the container software. The operation is similar to ezlxc.

#!/bin/bash

if [ $# -gt 0 ]; then
	echo
else
	echo "Usage: ezchroot directory"
	exit 1
fi

cp -L /etc/resolv.conf $1/etc/.
mount -t proc none $1/proc
mount --rbind /dev $1/dev
mount --rbind /sys $1/sys

echo "entering chroot directory"
env NAME=chroot chroot $1 /bin/bash
umount $1/proc
umount $1/dev
umount $1/sys
echo "chroot exited"