LXC – Fast virtualization with Linux containers – X86 and ARM

Stéphane Graber explains how to get started with linux containers on Ubuntu 12.04 here:-
Creating a basic container and starting it on Ubuntu 12.04 LTS is now down to:
sudo apt-get install lxc
sudo lxc-create -t ubuntu -n my-container
sudo lxc-start -n my-container
I needed this, because the container name was wrong.
sudo cp -rf my-container/ my-cloud-container/
This will default to using the same version and architecture as your machine, additional option are obviously available (–help will list them). Login/Password are ubuntu/ubuntu.
Container shuts down when the running system is shut down with the “halt” command.
Shut down a crashed container with:-
sudo lxc-stop -n my-container-name
It’s now possible to use qemu-user-static with LXC to run containers of non-native architectures, ARM for example:
sudo apt-get install lxc qemu-user-static
sudo lxc-create -n my-armhf-container -t ubuntu — -a armhf
sudo lxc-start -n my-armhf-container

Leave a comment