blob: ccdd0f9b08bec2f0724642debb6f91e2ad72bf40 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>4.2. Installation</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-qig-4.1.1-en-US-0-0" /><script type="text/javascript" src="../../../../../toc.js"></script><script type="text/javascript">
addID('Apache_CloudStack');
addID('Apache_CloudStack.4.1.1');
addID('Apache_CloudStack.4.1.1.books');
addID('Apache_CloudStack.4.1.1.qig');
</script><link rel="home" href="index.html" title="Quick Install Guide" /><link rel="up" href="chap-qig-KVM.html" title="Chapter 4. KVM Setup and installation" /><link rel="prev" href="chap-qig-KVM.html" title="Chapter 4. KVM Setup and installation" /><link rel="next" href="chap-qig-Config.html" title="Chapter 5. Configuration" /></head><body class="toc_embeded "><div id="tocdiv" class="toc"><iframe id="tocframe" class="toc" src="../../../../toc.html">This is an iframe, to view it upgrade your browser or enable iframe display.</iframe></div><p id="title"><a class="left" href="http://cloudstack.apache.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://cloudstack.apache.org/docs"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="chap-qig-KVM.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="chap-qig-Config.html"><strong>Next</strong></a></li></ul><div class="section" id="sect-qig-KVM-Installation"><div class="titlepage"><div><div><h2 class="title">4.2. Installation</h2></div></div></div><div class="para">
Installation of the KVM agent is trivial with just a single command, but afterwards we'll need to configure a few things.
</div><pre class="screen"><code class="prompt"># </code><strong class="userinput"><code><code class="command">yum</code> -y install cloud-agent</code></strong></pre><div class="section" id="sect-qig-KVM-Configuration"><div class="titlepage"><div><div><h3 class="title">4.2.1. KVM Configuration</h3></div></div></div><div class="para">
We have two different parts of KVM to configure, libvirt, and QEMU.
</div><div class="section" id="sect-qig-KVM-Configuration-qemu"><div class="titlepage"><div><div><h4 class="title">4.2.1.1. QEMU Configuration</h4></div></div></div><div class="para">
KVM configuration is relatively simple at only a single item. We need to edit the QEMU VNC configuration. This is done by editing <code class="filename">/etc/libvirt/qemu.conf</code> and ensuring the following line is present and uncommented.
<pre class="screen">vnc_listen=0.0.0.0</pre>
</div></div><div class="section" id="sect-qig-KVM-Configuration-libvirt"><div class="titlepage"><div><div><h4 class="title">4.2.1.2. Libvirt Configuration</h4></div></div></div><div class="para">
CloudStack uses libvirt for managing virtual machines. Therefore it is vital that libvirt is configured correctly. Libvirt is a dependency of cloud-agent and should already be installed.
</div><div class="orderedlist"><ol><li class="listitem"><div class="para">
In order to have live migration working libvirt has to listen for unsecured TCP connections. We also need to turn off libvirts attempt to use Multicast DNS advertising. Both of these settings are in <code class="filename">/etc/libvirt/libvirtd.conf</code>
</div><div class="para">
Set the following paramaters:
</div><pre class="programlisting">listen_tls = 0</pre><pre class="programlisting">listen_tcp = 1</pre><pre class="programlisting">tcp_port = "16059"</pre><pre class="programlisting">auth_tcp = "none"</pre><pre class="programlisting">mdns_adv = 0</pre></li><li class="listitem"><div class="para">
Turning on "listen_tcp" in libvirtd.conf is not enough, we have to change the parameters as well:
</div><div class="para">
On RHEL or CentOS modify <code class="filename">/etc/sysconfig/libvirtd</code>:
</div><div class="para">
Uncomment the following line:
</div><pre class="programlisting">#LIBVIRTD_ARGS="--listen"</pre><div class="para">
On Ubuntu: modify <code class="filename">/etc/init/libvirt-bin.conf</code>
</div><div class="para">
Change the following line (at the end of the file):
</div><pre class="programlisting">exec /usr/sbin/libvirtd -d</pre><div class="para">
to (just add -l)
</div><pre class="programlisting">exec /usr/sbin/libvirtd -d -l</pre></li><li class="listitem"><div class="para">
Restart libvirt
</div><div class="para">
In RHEL or CentOS:
</div><pre class="programlisting"><code class="command">$ service libvirtd restart</code></pre><div class="para">
In Ubuntu:
</div><pre class="programlisting"><code class="command">$ service libvirt-bin restart</code></pre></li></ol></div></div><div class="section" id="sect-qig-KVM-Configuration-finish"><div class="titlepage"><div><div><h4 class="title">4.2.1.3. KVM configuration complete</h4></div></div></div><div class="para">
That concludes our installation and configuration of KVM, and we'll now move to using the CloudStack UI for the actual configuration of our cloud.
</div></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="chap-qig-KVM.html"><strong>Prev</strong>Chapter 4. KVM Setup and installation</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="chap-qig-Config.html"><strong>Next</strong>Chapter 5. Configuration</a></li></ul></body></html>