Wednesday, 6 March 2013

Ubuntu LXC


Containers have been around from a while now and they can be used in so many different applications. Containers are like virtual machines, however they use the kernel of the machine they run on. This causes problems as many people have found ways of breaking out the virtual machine and into the host (see here). Containers are far less 'resource-hogging' and, I believe, they are far more dynamic. Recently, I have come a cross a container system called 'LXC'. LXC is pretty idiot-proof, however a simple tutorial could become handy)

Setting up LXC on a Ubuntu Machine

  1. Open a terminal session (CTRL-ALT-t) and type in:
    sudo apt-get install -y lxc lxctl
  2. After the install finishes, type:
    sudo lxc-create -n testmachine -t ubuntu
  3. The next job is to start the machine. In the terminal, type:
    sudo lxc-start -n testmachine After a few seconds the machine should boot and a serial console will appear. It will ask for a username and password (the default username for the ubuntu image is 'ubuntu' and the password is also 'ubuntu').
  4. You should now have a running container!

No comments :

Post a Comment

Please be responsible with comments. Any comments made on posts over 14 days will be moderated before appearing on the site.