From ae22344c785e624df9de6c2cdc79a53971e75c2b Mon Sep 17 00:00:00 2001 From: Wes Hayutin Date: Fri, 8 Mar 2019 09:49:36 -0700 Subject: [PATCH] check that kvm kernel modules are inserted The kvm flags in the kernel can be available but turned off in the bios. Check that the kernel module for kvm is available. Change-Id: Ibc2bc81cddd3698450723dd928f0c94dc510b7a8 --- .../templates/reproducer-zuul-based-quickstart.sh.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/create-zuul-based-reproducer/templates/reproducer-zuul-based-quickstart.sh.j2 b/roles/create-zuul-based-reproducer/templates/reproducer-zuul-based-quickstart.sh.j2 index 733bd3268..cb16d3de4 100644 --- a/roles/create-zuul-based-reproducer/templates/reproducer-zuul-based-quickstart.sh.j2 +++ b/roles/create-zuul-based-reproducer/templates/reproducer-zuul-based-quickstart.sh.j2 @@ -175,6 +175,7 @@ if [[ "$LIBVIRT" == "1" ]]; then # grep hypervisor returns true on virt echo "check if linux is running in a hypervisor" grep -q 'hypervisor' /proc/cpuinfo && LIBVIRT_ERROR=true || true + dmesg | grep kvm | grep -i disabled && LIBVIRT_ERROR=true || true if [[ ! -z "$LIBVIRT_ERROR" ]]; then echo -e "\e[31m ERROR: -l, libvirt attempted on a machine w/o libvirt capabilities, or on a virtual instance \e[0m" fi