experiment-x/run-diagnostics.sh
Dhiru Kholia ca219f57e5 OSX-KVM - March 2021 - Batch Update 1
Changes:

- Upgrade to OpenCore 0.6.7-RELEASE

- Big Sur image building script updates (Nick)
  - See https://github.com/kholia/OSX-KVM/pull/169 for details.

- Removed history to reduce repository size
2021-04-16 19:15:29 +05:30

47 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
# run-diagnostics.sh: checks common virtualization programs, modules and
# options. Written by Foxlet <foxlet@furcode.co>. Modified by Dhiru for OSX-KVM
# project.
#
# Note: This script is borrowed from https://github.com/foxlet/macOS-Simple-KVM
# project.
echo "== Distro Info ==" >&2
lsb_release -a 2>/dev/null
echo -e "\n== Loaded Modules ==" >&2
lsmod | grep kvm
lsmod | grep amd_iommu
lsmod | grep intel_iommu
v=$(cat /sys/module/kvm/parameters/ignore_msrs)
if [ "$v" != "Y" ]; then
echo -e "\nATTENTION: /sys/module/kvm/parameters/ignore_msrs setting seems to be incorrect!"
fi
echo -e "\n== Installed Binaries ==" >&2
if [ -x "$(command -v qemu-system-x86_64)" ]; then
qemu-system-x86_64 --version
else
echo -e "qemu is not installed." >&2
fi
if [ -x "$(command -v virt-manager)" ]; then
echo -e "virt-manager version $(virt-manager --version)"
else
echo -e "virt-manager is not installed." >&2
fi
if [ -x "$(command -v python)" ]; then
python --version
else
echo -e "python is not installed." >&2
fi
echo -e "\n== Networking ==" >&2
ip link show virbr0 >/dev/null 2>&1
if [ "$?" != 0 ]; then
echo -e "Interface virbr0 doesn't seem to exist. Check your networking configuration." >&2
else
echo -e "Found virbr0. Good."
fi