Containers share the same kernel as the host. So its not possible to run other operating systems. While it would be possible to run other Linux distributions, some modifications to the guest OS’s start/stop scripts might be necessary.
High Performance Computing (HPC) environment would benefit from containers. A Hadoop cluster running in containers would be far more efficient than running under a Hypervisor like Xen or KVM.
Couple of things to keep in mind while playing around with CloudStack 4.2’s LXC support:
- The community built RPMS available http://cloudstack.apt-get.eu don’t seem to have LXC support compiled in. See CLOUDSTACK-4849 for the fix if you run into the error “Could not find corresponding resource manager for LXC”. The instructions for building non-OSS RPMS are here
- CentOS 6.x and Ubuntu 12.04 LTS distributions come with older versions of libvirt and kvm-qemu packages. libvirt 1.0.0 or higher and Qemu/KVM 1.0 or higher is required. Ubuntu 13.10 has more recent versions and seems to be a good choice to use as an LXC host. The cloudstack-agent Deb certainly is happy to install on Ubuntu 13.10 hosts. While its certainly possible to install more recent version of kvm-qemu and libvirt pakages on Ubuntu 12.04 LTS/CentOS 6.x system, I found it to be very hackish to mix repos.
- After configuring the LXC cluster and adding the LXC host, you will require OS templates. No standard template is provided along with CloudStack. You would need to create one on your own. It would be best to create a template of the same distribution as the host’s. If you are using Ubuntu 13.10, create a template of Ubuntu 13.10 itself. CloudStack seems to want templates in the tar format
- Once you have create an OS template that’s compatible with the host’s running distribution, import it into CloudStack as a template
- Attempting to create new instance from the template fails for me at this time. CloudStack management server just spits out tons of messages as below:
2013-10-21 12:21:25,553 DEBUG [allocator.impl.FirstFitAllocator] (Job-Executor-17:job-66 = [ 7ffe9e13-c4e8-49ba-9ae4-4aff70197a4a ] FirstFitRoutingAllocator) Not considering hosts: [Host[-8-Routing]] to deploy template: Tmpl[204-TAR-204-2-38924546-779b-3ac1-bd1e-de8954924766 as they are not HVM enabled
There seems to be very limited information available currently on CloudStack and LXC. Please do let the cloudstack-users mailing list know if you make further progress. Also see https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in+Cloudstack