LXC support was added to CloudStack in 4.2 release. FS : LXC Support in Cloudstack. The objective of this feature is to enhance LXC support by adding more functionality. This document contains design specification of the enhancements.
LXC was implemented as hypervisor in cloudstack. Following operations are currently supported:
LXC containers are created using libvirt in cloudstack. Libvirt domain xml will be modified to support additional features. KVM system Vms are used for LXC, so most of the networking features are already supported.
Storage
Configure and create Ceph RBD on host and make it visible in the container using host passthrough configuration
<hostdev mode='capabilities' type='storage'>
<source>
<block>/dev/rbd1</block>
</source>
</hostdev>
[ceph-noarch]
name=Ceph noarch packages
baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/noarch
<pool type='rbd'>
<name>ae84381b-c273-3c8e-925f-8e384d3216b4</name>
<uuid>ae84381b-c273-3c8e-925f-8e384d3216b4</uuid>
<source>
<host name='10.147.59.89' port='6789'/> - Monitor host
<name>rbd</name> - Pool name
<auth username='admin' type='ceph'>
<secret uuid='ae84381b-c273-3c8e-925f-8e384d3216b4'/> - secret containing auth key
</auth>
</source>
</pool>
<secret ephemeral='no' private='no'>
<uuid>ae84381b-c273-3c8e-925f-8e384d3216b4</uuid>
<usage type='ceph'>
<name>admin@10.147.59.89:6789/rbd</name>
</usage>
</secret>
Template
Registering a template and Launching container from template is already supported. Additional functionality:
Networking
KVM system Vms are used and both VPC and non-VPC are supported. Networking services Source NAT, DNS, PF, LB, Vpn, Firewall, Security Groups, Network ACL are supported. Additionally nic hot-plug to userVm (container) is also supported. Secondary IPs are also supported.
Console Access
Below libvirt doesn't seem to work for LXC. autoport option did not assign a port.
<graphics type="vnc" port="-1" autoport="yes" listen="10.147.28.11" keymap="en-us"/>
No changes
None
Following steps need to be performed before installing agent on LXC host
LXC version 1.0
Libvirt Version 1.1.1
LXC hosts need not be hvm enabled. So, a VM can also act as a host for LXC conatiners. Currently, cloudstack doesn't allow hosts which are not hvm enabled. This check has to be relaxed for LXC.
1 Comment
Sudhap
Is this final FS for LXC in ACS 4.4??