SHA256
1
0
forked from pool/qemu
qemu/qemu-supportconfig
José Ricardo Ziviani eb86ba78e5 Accepting request 903710 from home:jziviani:branches:Virtualization
- Fix stable issues found in upstream:
  hmp-Fix-loadvm-to-resume-the-VM-on-succe.patch
  hw-block-nvme-align-with-existing-style.patch
  hw-nvme-fix-missing-check-for-PMR-capabi.patch
  hw-nvme-fix-pin-based-interrupt-behavior.patch
  linux-user-aarch64-Enable-hwcap-for-RND-.patch
  qemu-config-load-modules-when-instantiat.patch
  qemu-config-parse-configuration-files-to.patch
  qemu-config-use-qemu_opts_from_qdict.patch
  runstate-Initialize-Error-to-NULL.patch
  target-i386-Exit-tb-after-wrmsr.patch
  tcg-Allocate-sufficient-storage-in-temp_.patch
  tcg-sparc-Fix-temp_allocate_frame-vs-spa.patch
  vhost-vdpa-don-t-initialize-backend_feat.patch
  vl-allow-not-specifying-size-in-m-when-u.patch
  vl-Fix-an-assert-failure-in-error-path.patch
  vl-plug-object-back-into-readconfig.patch
  vl-plumb-keyval-based-options-into-readc.patch
  x86-acpi-use-offset-instead-of-pointer-w.patch
- Update qemu-supportconfig plugin
- Fix an update-alternative warning when removing qemu-skiboot package
  bsc#1178678

OBS-URL: https://build.opensuse.org/request/show/903710
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=660
2021-07-02 12:49:06 +00:00

81 lines
2.0 KiB
Bash

#!/bin/bash
#############################################################
# Name: Supportconfig Plugin for QEMU/KVM
# Description: Gathers important troubleshooting information
# about QEMU
# Author: Jim Fehlig <jfehlig@suse.com>
#############################################################
RCFILE="/usr/lib/supportconfig/resources/scplugin.rc"
if [ -s $RCFILE ]; then
if ! source $RCFILE; then
echo "ERROR: Initializing resource file: $RCFILE" >&2
exit 1
fi
fi
rpm_verify() {
thisrpm="$1"
local ret=0
echo
echo "#==[ Validating RPM ]=================================#"
if rpm -q "$thisrpm" >/dev/null 2>&1; then
echo "# rpm -V $thisrpm"
if rpm -V "$thisrpm"; then
echo "Status: Passed"
else
echo "Status: WARNING"
fi
else
echo "package $thisrpm is not installed"
ret=1
fi
echo
return $ret
}
if ! rpm_verify qemu; then
echo "Skipped"
exit 0
fi
# skip if the host is xen
echo "#==[ Checking if booted Xen ]=================================#"
if [ -d /proc/xen ] && [ -e /proc/xen/capabilities ] && [ `cat /proc/xen/capabilities` = "control_d" ]; then
echo "Yes"
echo "Skipped"
exit 0
else
echo "No"
echo
fi
# basic system information
plugin_command "uname -r"
plugin_command "lscpu"
plugin_command "lspci -v"
plugin_command "lsscsi"
plugin_command "kvm_stat -1"
plugin_command "lsmod | grep ^kvm"
for MODULE in `lsmod | grep ^kvm | cut -d ' ' -f 1`; do
plugin_command "modinfo $MODULE"
done
plugin_command "ps -ef | grep qemu"
# list contents of common config and image directories
plugin_command "ls -alR /var/lib/libvirt/images/"
# network-related info often useful for debugging
if [ systemctl is-enabled NetworkManager.service 2>&1 > /dev/null ]; then
echo "NOTE: NetworkManager should not be enabled on a KVM host"
fi
plugin_command "ip route list"
plugin_command "ip neigh list"
plugin_command "ip link show type bridge"
plugin_command "bridge link show"
echo "Done"