Today I’m going to write about a couple of major gotchas with LXC. Now these issues are documented in various places but I wanted to put all the relevant information together in one place to make it easier for people.
Before going any further it’s important to note that I created my LXC container with the official Ubuntu template from the latest “stable” LXC release i.e. I downloaded the tarball and put the template in the correct place as Ubuntu 10.04′s LXC package doesn’t contain said template. This helps minimise all sorts of problems especially ones related to the LXC console crashing and the like.
Firstly you will find when running “apt-get upgrade” (if you have Lucid updates enabled in /etc/apt/sources.list) that you get this error on upgrading udev:-
mknod: `/lib/udev/devices/ppp': Operation not permitted
I have spent literally hours over the last year or two searching for an elegant way to remove configuration files left over from package installs, in a command line environment, with Ubuntu.
Googling would provide a frustrating list of solutions that would either involve installing extra packages, using a complicated command line, or script, solutions that I would never be happy with and would “redo” the search again, each time I wanted to perform the same task, in the hope of finding something better.
In the end Aptitude and Xargs were my friends. Without further ado ….