openstack-manuals/doc/common/section_qemu.xml
Diane Fleming 64b6c9261e Folder rename, file rename, flattening of directories
Current folder name	New folder name	        Book title
----------------------------------------------------------
basic-install 	        DELETE
cli-guide	        DELETE
common	                common
NEW	                admin-guide-cloud	Cloud Administrators Guide
docbkx-example	        DELETE
openstack-block-storage-admin 	DELETE
openstack-compute-admin 	DELETE
openstack-config 	config-reference	OpenStack Configuration Reference
openstack-ha 	        high-availability-guide	OpenStack High Availabilty Guide
openstack-image	        image-guide	OpenStack Virtual Machine Image Guide
openstack-install 	install-guide	OpenStack Installation Guide
openstack-network-connectivity-admin 	admin-guide-network 	OpenStack Networking Administration Guide
openstack-object-storage-admin 	DELETE
openstack-security 	security-guide	OpenStack Security Guide
openstack-training 	training-guide	OpenStack Training Guide
openstack-user 	        user-guide	OpenStack End User Guide
openstack-user-admin 	user-guide-admin	OpenStack Admin User Guide
glossary	        NEW        	OpenStack Glossary

bug: #1220407

Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7
author: diane fleming
2013-09-08 15:15:50 -07:00

70 lines
3.8 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>KVM requires hardware support for acceleration. If hardware support is
not available (e.g., if you are running Compute inside of a VM and the
hypervisor does not expose the required hardware support), you can use
QEMU instead. KVM and QEMU have the same level of support in OpenStack,
but KVM will provide better performance. 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>
<screen os="ubuntu"><prompt>$></prompt> <userinput>sudo apt-get install guestmount</userinput></screen>
<screen os="rhel;fedora;centos"><prompt>$></prompt> <userinput>sudo yum install libguestfs-tools</userinput></screen>
<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" os="rhel;fedora;centos"><title>Tips and fixes for QEMU on RHEL</title>
<para>If you are testing OpenStack in a virtual machine, you need
to configure nova to use qemu without KVM and hardware
virtualization. The second command relaxes SELinux rules
to allow this mode of operation
(https://bugzilla.redhat.com/show_bug.cgi?id=753589). The
last two commands here work around a libvirt issue fixed in
RHEL 6.4. Note nested virtualization will be the much
slower TCG variety, and you should provide lots of memory
to the top level guest, as 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>sudo openstack-config --set /etc/nova/nova.conf DEFAULT libvirt_type qemu</userinput>
<prompt>$></prompt> <userinput>sudo setsebool -P virt_use_execmem on</userinput>
<prompt>$></prompt> <userinput>sudo ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64</userinput>
<prompt>$></prompt> <userinput>sudo service libvirtd restart</userinput></screen>
</section>
</section>