Add distro support for KVM for IBM z Systems

Add "KVM for IBM z Systems" to the list of Fedora-like distros.

As the distribution does not have a dedicated kvm package,
prevent the installation of the kvm package during the libvirt
setup.

Change-Id: Ibb5c60797d6867264f9dea7fea85cdf1d7c72ded
This commit is contained in:
Alexander Schmidt 2015-12-02 15:30:44 +00:00 committed by Markus Zoeller
parent b615691576
commit a5ea08b752
3 changed files with 8 additions and 3 deletions

View File

@ -410,6 +410,8 @@ function GetDistro {
DISTRO="rhel${os_RELEASE::1}" DISTRO="rhel${os_RELEASE::1}"
elif [[ "$os_VENDOR" =~ (XenServer) ]]; then elif [[ "$os_VENDOR" =~ (XenServer) ]]; then
DISTRO="xs$os_RELEASE" DISTRO="xs$os_RELEASE"
elif [[ "$os_VENDOR" =~ (kvmibm) ]]; then
DISTRO="${os_VENDOR}${os_RELEASE::1}"
else else
# Catch-all for now is Vendor + Release + Update # Catch-all for now is Vendor + Release + Update
DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE" DISTRO="$os_VENDOR-$os_RELEASE.$os_UPDATE"
@ -444,7 +446,7 @@ function is_fedora {
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \ [ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \
[ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "OracleLinux" ] || \ [ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "OracleLinux" ] || \
[ "$os_VENDOR" = "CloudLinux" ] [ "$os_VENDOR" = "CloudLinux" ] || [ "$os_VENDOR" = "kvmibm" ]
} }

View File

@ -38,7 +38,10 @@ function install_libvirt {
fi fi
#pip_install_gr <there-si-no-guestfs-in-pypi> #pip_install_gr <there-si-no-guestfs-in-pypi>
elif is_fedora || is_suse; then elif is_fedora || is_suse; then
# On "KVM for IBM z Systems", kvm does not have its own package
if [[ ! ${DISTRO} =~ "kvmibm1" ]]; then
install_package kvm install_package kvm
fi
# there is a dependency issue with kvm (which is really just a # there is a dependency issue with kvm (which is really just a
# wrapper to qemu-system-x86) that leaves some bios files out, # wrapper to qemu-system-x86) that leaves some bios files out,
# so install qemu-kvm (which shouldn't strictly be needed, as # so install qemu-kvm (which shouldn't strictly be needed, as

View File

@ -183,7 +183,7 @@ source $TOP_DIR/stackrc
# Warn users who aren't on an explicitly supported distro, but allow them to # Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack`` # override check and attempt installation with ``FORCE=yes ./stack``
if [[ ! ${DISTRO} =~ (trusty|vivid|wily|7.0|wheezy|sid|testing|jessie|f22|f23|rhel7) ]]; then if [[ ! ${DISTRO} =~ (trusty|vivid|wily|7.0|wheezy|sid|testing|jessie|f22|f23|rhel7|kvmibm1) ]]; then
echo "WARNING: this script has not been tested on $DISTRO" echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes" die $LINENO "If you wish to run this script anyway run with FORCE=yes"