QEMUFrom 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.The typical uses cases for QEMU areRunning on older hardware that lacks
virtualization support.Running the Compute service inside of a virtual
machine for development or testing purposes, where
the hypervisor does not support native
virtualization for guests.
To enable QEMU, add these settings to
nova.conf:compute_driver=libvirt.LibvirtDriver
libvirt_type=qemu
For some operations you may also have to install the guestmount utility:On Ubuntu:
$>sudo apt-get install guestmountOn RHEL, Fedora or CentOS:
$>sudo yum install libguestfs-toolsOn openSUSE:
$>sudo zypper install guestfs-toolsThe QEMU hypervisor supports the following virtual machine image formats:RawQEMU Copy-on-write (qcow2)VMWare virtual machine disk format (vmdk)Tips and fixes for QEMU on RHELIf 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.The second command, setsebool, may take a while.
$>sudo openstack-config --set /etc/nova/nova.conf DEFAULT libvirt_type qemu$>sudo setsebool -P virt_use_execmem on$>sudo ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64$>sudo service libvirtd restart