Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

This docoument contains the design specification for LXC support in Cloudstack.

Status

Code complete, testing and adding documentation. See last section below for detailsfeature has been merged to master branch.

References

Feature Specification

...

Environment setup and testing

Obtaining latest code

The code for LXC support is on github on the lxc branchLXC code has been merged to the master branch for Cloudstack:

Code Block
git clone -b lxc git@github.com:gilt/incubator-https://git-wip-us.apache.org/repos/asf/cloudstack.git

Follow directions in /docs/en-US/build-rpm.xml to build RPMs for Cloudstack.

...

Import the latest system VM images for your templateimage:

2. Update Secondary Storage System VM with LXC code

NOTE: (4/13/13) Since LXC has been merged to master, this step can be skipped. However, I have not had the chance to verify this yet.

After the secondary storage VM is online, we need to login and swap out the jars since it doesn't include the LXC code.

Code Block

ssh -i /root/.ssh/id_rsa.cloud -p 3922 root@169.254.x.x (SSVM local link ip)
cp -r /usr/local/cloud/systemvm /usr/local/cloud/systemvm.orig
rm /usr/local/cloud/systemvm/cloud-*.jar
scp root@<lxc-host>:<incubator-cloudstack-dir>/client/target/cloud-client-ui-4.2.0-SNAPSHOT/WEB-INF/lib/cloud-*.jar /usr/local/cloud/systemvm
service cloud stop
service cloud start

...

Code Block

/web/cloudstack/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://jenkins.cloudstack.org/view/master/job/build-systemvm-master/lastSuccessfulBuild/artifact/tools/appliance/dist/systemvmtemplate-2013-04-14-master-kvm.qcow2.bz2 -h kvm -F

2. LXC container

Cloudstack will not come bundled with an LXC container image, so you will need to prepare one yourself or download one.

4. Fix hypervisor list

There is a small bug around the available list of hypervisors – somehow the LXC hypervisor doesn't get set in the available list. After your management server starts up, either run this command in mysql:

Code Block

UPDATE configuration SET value='KVM,XenServer,VMware,BareMetal,Ovm,LXC' WHERE name='hypervisor.list';

or go to the configuration settings in the Admin UI and add LXC to the list of values for "hypervisor.list".

I will submit a patch for it as soon as I figure out where it's getting over written.