Bug Reference
CLOUDSTACK-6122
Introduction
Purpose
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.
References
LXC Support in Cloudstack
CLOUDSTACK-922
Feature Specifications
LXC was implemented as hypervisor in cloudstack. Following operations are currently supported:
- Add an LXC cluster
- Add an LXC host
- Register an LXC template
- Spin up an LXC container
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
- DATA disk: Support data disk while creating container.
- Support attach/detach disk. attach-disk and detach-disk are supported by libvirt (since 1.0.2) for lxc. Same will be leveraged to support attach/detach data volume.
- Support Ceph storage that will appear as block device on host using RBD
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>
- Migrate volume of a stopped container. Container root volume will be migrated across primary storages by copying compressed tar.gz of the root file system.
Template
Registering a template and Launching container from template is already supported. Additional functionality:
- Create template from ROOT volume. Template is a compressed tar.gz of the root file system. Create template from volume will copy the tar.gz of the root file system to secondary storage.
ISO
- Register an ISO: Register an ISO and download on to secondary storage
- Attach/Detach an ISO to a container: Involves copying the ISO from secondary to primary and the attached the ISO to container by mounting (using attach-device).
- Launch container from ISO: Mount ISO image as rootfs for container
Console Access
CLOUDSTACK-4990
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"/>
Database
No changes
New APIs
None
Limitations
Open Issues
Min required libvirt version should be documented