blob: 40f6a0aaa6963b28ea8f4ce6c8bd8cb826bc203d [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
%BOOK_ENTITIES;
]>
<!-- Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<section id="lxc-install">
<title>LXC Installation and Configuration</title>
<section id="lxc-requirements">
<title>System Requirements for LXC Hosts</title>
<para>LXC requires the Linux kernel cgroups functionality which is available starting 2.6.24. Although you are not required to run these distributions, the following are recommended:</para>
<itemizedlist>
<listitem><para>CentOS / RHEL: 6.3</para></listitem>
<listitem><para>Ubuntu: 12.04(.1)</para></listitem>
</itemizedlist>
<para>The main requirement for LXC hypervisors is the libvirt and Qemu version. No matter what
Linux distribution you are using, make sure the following requirements are met:</para>
<itemizedlist>
<listitem><para>libvirt: 1.0.0 or higher</para></listitem>
<listitem><para>Qemu/KVM: 1.0 or higher</para></listitem>
</itemizedlist>
<para>The default bridge in &PRODUCT; is the Linux native bridge implementation (bridge module). &PRODUCT; includes an option to work with OpenVswitch, the requirements are listed below</para>
<itemizedlist>
<listitem><para>libvirt: 1.0.0 or higher</para></listitem>
<listitem><para>openvswitch: 1.7.1 or higher</para></listitem>
</itemizedlist>
<para>In addition, the following hardware requirements apply:</para>
<itemizedlist>
<listitem><para>Within a single cluster, the hosts must be of the same distribution version.</para></listitem>
<listitem><para>All hosts within a cluster must be homogenous. The CPUs must be of the same type, count, and feature flags.</para></listitem>
<listitem><para>Must support HVM (Intel-VT or AMD-V enabled)</para></listitem>
<listitem><para>64-bit x86 CPU (more cores results in better performance)</para></listitem>
<listitem><para>4 GB of memory</para></listitem>
<listitem><para>At least 1 NIC</para></listitem>
<listitem><para>When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running</para></listitem>
</itemizedlist>
</section>
<section id="lxc-install-overview">
<title>LXC Installation Overview</title>
<para>LXC does not have any native system VMs, instead KVM will be used to run system VMs. This means that your host will need to support both LXC and KVM, thus most of the installation and configuration will be identical to the KVM installation. The material in this section doesn't duplicate KVM installation docs. It provides the &PRODUCT;-specific steps that are needed to prepare a KVM host to work with &PRODUCT;.</para>
<warning><para>Before continuing, make sure that you have applied the latest updates to your host.</para></warning>
<warning><para>It is NOT recommended to run services on this host not controlled by &PRODUCT;.</para></warning>
<para>The procedure for installing an LXC Host is:</para>
<orderedlist>
<listitem><para>Prepare the Operating System</para></listitem>
<listitem><para>Install and configure libvirt</para></listitem>
<listitem><para>Configure Security Policies (AppArmor and SELinux)</para></listitem>
<listitem><para>Install and configure the Agent</para></listitem>
</orderedlist>
</section>
<section id="lxc-install-prepare-os">
<xi:include href="hypervisor-host-install-prepare-os.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
<section id="lxc-install-agent">
<title>Install and configure the Agent</title>
<para>To manage LXC instances on the host &PRODUCT; uses a Agent. This Agent communicates with the Management server and controls all the instances on the host.</para>
<para>First we start by installing the agent:</para>
<para>In RHEL or CentOS:</para>
<programlisting language="Bash"><command>$ yum install cloudstack-agent</command></programlisting>
<para>In Ubuntu:</para>
<programlisting language="Bash"><command>$ apt-get install cloudstack-agent</command></programlisting>
<para>Next step is to update the Agent configuration setttings. The settings are in <filename>/etc/cloudstack/agent/agent.properties</filename></para>
<orderedlist>
<listitem>
<para>Set the Agent to run in LXC mode:</para>
<programlisting>hypervisor.type=lxc</programlisting>
</listitem>
<listitem>
<para>Optional: If you would like to use direct networking (instead of the default bridge networking), configure these lines:</para>
<programlisting>libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver</programlisting>
<programlisting>network.direct.source.mode=private</programlisting>
<programlisting>network.direct.device=eth0</programlisting>
</listitem>
</orderedlist>
<para>The host is now ready to be added to a cluster. This is covered in a later section, see <xref linkend="host-add" />. It is recommended that you continue to read the documentation before adding the host!</para>
</section>
<section id="lxc-install-libvirt">
<xi:include href="hypervisor-host-install-libvirt.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
<section id="lxc-install-security-policies">
<xi:include href="hypervisor-host-install-security-policies.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
<section id="lxc-install-network">
<xi:include href="hypervisor-host-install-network.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
<section id="lxc-install-firewall">
<xi:include href="hypervisor-host-install-firewall.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
<section id="lxc-install-finish">
<xi:include href="hypervisor-host-install-finish.xml#xpointer(/section/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
</section>