Note about LXC Squeeze-Backport version

This procedure is not complete, it don't working on my system (an author)

Preparing the host

Memory cgroup support (CONFIG_CGROUP_MEM_RES_CTLR, 534964,

is available for Squeeze since kernel version 2.6.39-bpo60-2. It is deactivated by default. You need to activate it with a kernel parameter. When using grub2, this can be easily done by setting GRUB_CMDLINE_LINUX="cgroup_enable=memory" in /etc/default/grub and running update-grub2.
Same goes for swap+memory (CONFIG_CGROUP_MEM_RES_CTLR_SWAP), kernel parameter "swapaccount=1" - see http://lists.debian.org/debian-kernel/2012/01/msg00804.html .

LXC Installation

# echo "deb http://backports.debian.org/debian-backports squeeze-backports main" > /etc/apt/sources.list.d/lxc.list
# echo -e "Package: lxc\nPin: release a=squeeze-backports\nPin-Priority: 1000" > /etc/apt/preferences.d/lxc

# apt-get install lxc debootstrap bridge-utils libvirt-bin

# echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab
# mount /sys/fs/cgroup

Create new container

# lxc-create -n foobar -t debian

This command will ask you some questions…

RootFS creation

cp -a /usr/lib/lxc/templates/lxc-debian /usr/lib/lxc/templates/lxc-squeeze

lxc-create -n myvm -t squeeze -f /usr/share/doc/lxc/examples/lxc-veth.conf

References