summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-08-30 09:28:42 +0200
committerManuel Bentele2021-08-30 09:28:42 +0200
commit2ffdaeb5de3981f859a5b399afd88f00c891d72f (patch)
tree2d42dca5011ef65b60df75813e7df1867d5d8ca0
parent[qemu] Add printing of status for mediated device setup (diff)
downloadmltk-2ffdaeb5de3981f859a5b399afd88f00c891d72f.tar.gz
mltk-2ffdaeb5de3981f859a5b399afd88f00c891d72f.tar.xz
mltk-2ffdaeb5de3981f859a5b399afd88f00c891d72f.zip
[qemu] Print information in setup script for systemd
-rwxr-xr-xcore/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env15
1 files changed, 7 insertions, 8 deletions
diff --git a/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env b/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env
index e0bc81f6..e835a849 100755
--- a/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env
+++ b/core/modules/qemu/data/opt/openslx/scripts/systemd-qemu_env
@@ -19,7 +19,6 @@
#
# create and setup Intel GVT-g mediated device instance for passthrough if Intel GVT-g is enabled
#
-declare -rg LOGFILE="/dev/null"
source /opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
source /opt/openslx/vmchooser/plugins/qemukvm/includes/kernel-cmdln.inc
source /opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc
@@ -27,25 +26,25 @@ source /opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc
if passthrough_mdev_enabled; then
# check if passthrough is configured properly
if ! passthrough_mdev_check; then
- slxlog "qemu" "mediated device passthrough is enabled but not setup properly!"
+ slxlog --echo "qemu" "mediated device passthrough is enabled but not setup properly!"
exit 2;
fi
# load required kernel modules for mediated device passthrough
- modprobe "vfio-mdev" || { slxlog "qemu" "Could not load 'vfio-mdev' kernel modul!"; exit 3; }
- modprobe "kvmgt" || { slxlog "qemu" "Could not load 'kvmgt' kernel modul!"; exit 4; }
+ modprobe "vfio-mdev" || { slxlog --echo "qemu" "Could not load 'vfio-mdev' kernel modul!"; exit 3; }
+ modprobe "kvmgt" || { slxlog --echo "qemu" "Could not load 'kvmgt' kernel modul!"; exit 4; }
# get Intel integrated GPU mediated device for passthrough
pt_mdev_device="$(passthrough_mdev_device_get_intel_igd)"
if [ -z "${pt_mdev_device}" ]; then
- slxlog "qemu" "Could find any Intel integrated GPU with mediated device (Intel GVT-g) support!"
+ slxlog --echo "qemu" "Could find any Intel integrated GPU with mediated device (Intel GVT-g) support!"
exit 5;
fi
# get Intel GVT-g mediated device instance type
pt_mdev_device_type="$(passthrough_mdev_type_get "${pt_mdev_device}")"
if [ -z "${pt_mdev_device_type}" ]; then
- slxlog "qemu" "Could obtain the mediated device instance type of the Intel integrated GPU (${pt_mdev_device})"
+ slxlog --echo "qemu" "Could obtain the mediated device instance type of the Intel integrated GPU (${pt_mdev_device})"
exit 6;
fi
@@ -55,8 +54,8 @@ if passthrough_mdev_enabled; then
# create Intel GVT-g mediated device instance
passthrough_mdev_instance_create "${pt_mdev_device}" "${pt_mdev_device_type}" "${pt_mdev_uuid}"
if [ "${?}" -eq 0 ]; then
- slxlog "qemu" "Successfully created Intel GVT-g mediated device instance (${pt_mdev_uuid})"
+ slxlog --echo "qemu" "Successfully created Intel GVT-g mediated device instance (${pt_mdev_uuid})"
else
- slxlog "qemu" "Failed to create Intel GVT-g mediated device instance!"
+ slxlog --echo "qemu" "Failed to create Intel GVT-g mediated device instance!"
fi
fi