Difference between revisions of "LXC"
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | Before setting up LXC with nova you have to enable cgroups: | ||
+ | |||
+ | |||
+ | <pre><nowiki>{ | ||
+ | sudo mkdir /cgroup | ||
+ | sudo mount none -t cgroup /cgroup | ||
+ | </nowiki></pre> | ||
+ | } | ||
+ | |||
+ | And add to your /etc/fstab | ||
+ | |||
+ | |||
+ | <pre><nowiki>{ | ||
+ | none /cgroup cgroup defaults 0 0 | ||
+ | </nowiki></pre> | ||
+ | } | ||
+ | |||
If you want to play with LXC on nova, here is how you do it: | If you want to play with LXC on nova, here is how you do it: | ||
Revision as of 14:32, 28 February 2011
Before setting up LXC with nova you have to enable cgroups:
{ sudo mkdir /cgroup sudo mount none -t cgroup /cgroup
}
And add to your /etc/fstab
{ none /cgroup cgroup defaults 0 0
}
If you want to play with LXC on nova, here is how you do it:
- Download the ttylinux from here.
- In order to use LXC in nova you have to add "--libvirt-type=lxc" to your config.
Bundle your image as you normally would:
{ euca-bundle-image -i ttylinux-lxc-natty-2.6.38-5.img euca-upload-bundle -b mybucket -m /tmp/ttylinux-lxc-natty-2.6.38-5.img.manifest.xml euca-register mybucket/ttylinux-lxc-natty-2.6.38-5.img.manifest.xml
}
If you want to use a normal UEC image with LXC, before bundling it you have to install the lxcguest package:
{ sudo mount -o loop <image name> <mount point> sudo mount -o bind /proc <mount point>/proc sudo cp /etc/resolv.conf <mount point>/etc sudo chroot <mount point> apt-get install lxcguest <exit the chroot> sudo umount <mount point>/proc sudo umount <mount point>
}