Browse code

Use qemu-kvm-ev package on centos

For the latest qemu-kvm, you have to use the qemu-kvm-ev package,
which is based off the qemu-kvm-rhev package, which is explained in
[1] but you probably can't read it. The gist is, that qemu-kvm-rhev
is a later build of kvm that is incompatible with the base version
provided. qemu-kvm-rhev is only provided with the RHV (ovirt) and
RHOS (openstack) products. CentOS rebuilds this package as
qemu-kvm-ev as part of it's virtualisation SIG.

I9a972e3fde2e4e552f6fc98350820c07873c3de3 has bumped up the minimum
qemu version to 2.1.0. It seems there is a an issue (bug #1668164)
where having the qemu-system package installed gets picked up if
installed, and reports the incorrect version to nova, causing failure.

This removes the installs from files/rpms/nova as it is all being done
in function-libvirt. We only install the qemu-kvm-ev package on
centos and remove the old work-around.

[1] https://access.redhat.com/solutions/629513
[2] https://wiki.centos.org/SpecialInterestGroup/Virtualization

Change-Id: Ide91b261f35fb19d8bd7155ca016fa3b76a45ea1

Ian Wienand authored on 2017/02/27 13:11:11
Showing 2 changed files
... ...
@@ -9,10 +9,6 @@ iptables
9 9
 iputils
10 10
 kernel-modules # dist:f23,f24,f25
11 11
 kpartx
12
-kvm # NOPRIME
13
-libvirt-bin # NOPRIME
14
-libvirt-devel # NOPRIME
15
-libvirt-python # NOPRIME
16 12
 libxml2-python
17 13
 m2crypto
18 14
 mysql-devel
... ...
@@ -21,7 +17,6 @@ mysql-server # NOPRIME
21 21
 numpy # needed by websockify for spice console
22 22
 parted
23 23
 polkit
24
-qemu-kvm # NOPRIME
25 24
 rabbitmq-server # NOPRIME
26 25
 sqlite
27 26
 sudo
... ...
@@ -34,18 +34,23 @@ function install_libvirt {
34 34
         #pip_install_gr <there-si-no-guestfs-in-pypi>
35 35
     elif is_fedora || is_suse; then
36 36
         # On "KVM for IBM z Systems", kvm does not have its own package
37
-        if [[ ! ${DISTRO} =~ "kvmibm1" ]]; then
37
+        if [[ ! ${DISTRO} =~ "kvmibm1" && ! ${DISTRO} =~ "rhel7" ]]; then
38 38
             install_package kvm
39 39
         fi
40
-        # there is a dependency issue with kvm (which is really just a
41
-        # wrapper to qemu-system-x86) that leaves some bios files out,
42
-        # so install qemu-kvm (which shouldn't strictly be needed, as
43
-        # everything has been merged into qemu-system-x86) to bring in
44
-        # the right packages. see
45
-        # https://bugzilla.redhat.com/show_bug.cgi?id=1235890
46
-        install_package qemu-kvm
40
+
41
+        if [[ ${DISTRO} =~ "rhel7" ]]; then
42
+            # On centos7 install the qemu-kvm-ev package, which is a
43
+            # later version of qemu-kvm rebuilt from the qemu-kvm-rhev
44
+            # package by the virt SIG (as required by nova).  This
45
+            # package is only provided for RHOS (openstack) or RHV
46
+            # (ovirt) in RHEL.  We have already insalled the RDO
47
+            # repositories which provide this.
48
+            install_package qemu-kvm-ev
49
+        fi
50
+
47 51
         install_package libvirt libvirt-devel
48 52
         pip_install_gr libvirt-python
53
+
49 54
     fi
50 55
 }
51 56