DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.

DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
This docoument contains the design specification for LXC support in Cloudstack.
Currently in development/testing, see last section below for detailsCode complete, feature has been merged to master branch.
...
| Code Block |
|---|
libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver network.direct.source.mode=private/bridge/vepa (other values: bridge|vepa) network.direct.device=eth0 |
For minimum requirements, you will need to run the management server and an LXC host. The LXC host has the exact same setup as KVM, the only difference is you specify the "lxc" hypervisor in the agent config file. The LXC host will run the system VMs under KVM.
I am currently running my dev/test setup on two machines: 1) runs the management and 2) the other runs the LXC agent. The following sections detail how to get the development code running so that you can spin up LXC containers with Cloudstack. It's not very elegant, but is the easiest way I've found to quickly get the system up with development code. There's probably an easier way to do this, like with RPMs, but I haven't gotten around to that yet.
...
| Code Block |
|---|
if [ "$templateId" == "" ]
then
if [ "$hyper" == "kvm" ]
then
ext="qcow2"
templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names -U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and\
hypervisor_type = \"KVM\" and removed is null"`)
<insert below>
elif [ "$hyper" == "lxc" ]
then
ext="qcow2"
templateId=(`mysql -h $dbHost --user=$dbUser --password=$dbPassword --skip-column-names -U cloud -e "select max(id) from cloud.vm_template where type = \"SYSTEM\" and\
hypervisor_type = \"LXC\" and removed is null"`)
<end of insert>
elif [ "$hyper" == "xenserver" ]
|
...
NOTE: The network device that is specified should not be a slave to any bridges.
The LXC code has been merged to the master branch for Cloudstack:
| Code Block |
|---|
git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git
|
Follow directions in /docs/en-US/build-rpm.xml to build RPMs for Cloudstack.
I will not cover how to install Cloudstack, please use the latest online documents. There are a few things to note when using the LXC code:
Import the latest system VM image:
| 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
|
Cloudstack will not come bundled with an LXC container image, so you will need to prepare one yourself or download one.
| Code Block |
|---|
PCP=""
for jarfile in <incubator-cloudstack-dir>/client/target/cloud-client-ui-4.1.0-SNAPSHOT/WEB-INF/lib/cloud-*.jar /usr/share/java/jna.jar; do
if [ ! -e "$jarfile" ] ; then continue ; fi
PCP=$jarfile:$PCP
done
export CLASSPATH="$SCP:$DCP:$PCP:$JCP:/etc/cloud/agent:/usr/lib64/cloud/agent"
|
In this step we bring up the system to the point where system VMs are created. After the Secondary Storage VM starts up, we will swap out the cloud jars with the ones we've built.
| 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
|
...