openstack-manuals/doc/config-reference/compute/section_hypervisor_qemu.xml
Andreas Jaeger 4418c9962a Remove sudo usage from config reference
Remove sudo usage and adjust prompts as needed.

Change-Id: Ia1df06230203f7c8393b7f369c3dc396d8143799
2014-03-10 20:12:45 +01:00

71 lines
3.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:id="qemu">
<?dbhtml stop-chunking?>
<title>QEMU</title>
<para>From the perspective of the Compute service, the QEMU hypervisor is very similar to the KVM
hypervisor. Both are controlled through libvirt, both support the same feature set, and all
virtual machine images that are compatible with KVM are also compatible with QEMU. The main
difference is that QEMU does not support native virtualization. Consequently, QEMU has worse
performance than KVM and is a poor choice for a production deployment.</para>
<para>The typical uses cases for QEMU are<itemizedlist>
<listitem>
<para>Running on older hardware that lacks
virtualization support.</para>
</listitem>
<listitem>
<para>Running the Compute service inside of a virtual
machine for development or testing purposes, where
the hypervisor does not support native
virtualization for guests.</para>
</listitem>
</itemizedlist></para>
<para>
To enable QEMU, add these settings to
<filename>nova.conf</filename>:<programlisting language="ini">compute_driver=libvirt.LibvirtDriver
libvirt_type=qemu</programlisting></para>
<para>
For some operations you may also have to install the <command>guestmount</command> utility:</para>
<para>On Ubuntu:
<screen><prompt>#</prompt> <userinput>apt-get install guestmount</userinput></screen>
</para>
<para>On Red Hat Enterprise Linux, Fedora, or CentOS:
<screen><prompt>#</prompt> <userinput>yum install libguestfs-tools</userinput></screen>
</para>
<para>On openSUSE:
<screen><prompt>#</prompt> <userinput>zypper install guestfs-tools</userinput></screen>
</para>
<para>The QEMU hypervisor supports the following virtual machine image formats:</para>
<itemizedlist>
<listitem>
<para>Raw</para>
</listitem>
<listitem>
<para>QEMU Copy-on-write (qcow2)</para>
</listitem>
<listitem>
<para>VMware virtual machine disk format (vmdk)</para>
</listitem>
</itemizedlist>
<section xml:id="fixes-rhel-qemu">
<title>Tips and fixes for QEMU on RHEL</title>
<para>If you are testing OpenStack in a virtual machine, you must configure Compute to use qemu
without KVM and hardware virtualization. The second command relaxes SELinux rules to
allow this mode of operation (<link
xlink:href="https://bugzilla.redhat.com/show_bug.cgi?id=753589">
https://bugzilla.redhat.com/show_bug.cgi?id=753589</link>). The last two commands
here work around a libvirt issue fixed in Red Hat Enterprise Linux 6.4. Nested
virtualization will be the much slower TCG variety, and you should provide lots of
memory to the top-level guest, because the OpenStack-created guests default to 2GM RAM
with no overcommit.</para>
<note><para>The second command, <command>setsebool</command>, may take a while.
</para></note>
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT libvirt_type qemu</userinput>
<prompt>#</prompt> <userinput>setsebool -P virt_use_execmem on</userinput>
<prompt>#</prompt> <userinput>ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64</userinput>
<prompt>#</prompt> <userinput>service libvirtd restart</userinput></screen>
</section>
</section>