| <?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="hypervisor-host-install-libvirt"> |
| <title>Install and Configure libvirt</title> |
| <para>&PRODUCT; uses libvirt for managing virtual machines. Therefore it is vital that libvirt is configured correctly. Libvirt is a dependency of cloudstack-agent and should already be installed.</para> |
| <orderedlist> |
| <listitem> |
| <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 <filename>/etc/libvirt/libvirtd.conf</filename></para> |
| <para>Set the following parameters:</para> |
| <programlisting>listen_tls = 0</programlisting> |
| <programlisting>listen_tcp = 1</programlisting> |
| <programlisting>tcp_port = "16509"</programlisting> |
| <programlisting>auth_tcp = "none"</programlisting> |
| <programlisting>mdns_adv = 0</programlisting> |
| </listitem> |
| <listitem> |
| <para>Turning on "listen_tcp" in libvirtd.conf is not enough, we have to change the parameters as well:</para> |
| <para>On RHEL or CentOS modify <filename>/etc/sysconfig/libvirtd</filename>:</para> |
| <para>Uncomment the following line:</para> |
| <programlisting>#LIBVIRTD_ARGS="--listen"</programlisting> |
| <para>On Ubuntu: modify <filename>/etc/default/libvirt-bin</filename></para> |
| <para>Add "-l" to the following line::</para> |
| <programlisting>libvirtd_opts="-d"</programlisting> |
| <para>so it looks like:</para> |
| <programlisting>libvirtd_opts="-d -l"</programlisting> |
| </listitem> |
| <listitem> |
| <para>Restart libvirt</para> |
| <para>In RHEL or CentOS:</para> |
| <programlisting><command>$ service libvirtd restart</command></programlisting> |
| <para>In Ubuntu:</para> |
| <programlisting><command>$ service libvirt-bin restart</command></programlisting> |
| </listitem> |
| </orderedlist> |
| </section> |