diff options
-rw-r--r-- | core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc | 3 | ||||
-rw-r--r-- | core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc index 067cc35d..f2e2942b 100644 --- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc @@ -145,14 +145,11 @@ function passthrough_mdev_setup() { return 1; fi - writelog "Passthrough of mediated devices (mdev) is enabled successfully" - # obtain created mediated device for passthrough local pt_gpu_mdev_id="$(passthrough_mdev_instance_get)" # check if mediated device ID could be obtained if [ -z "${pt_gpu_mdev_id}" ]; then - writelog "Failed to obtain created mediated device UUID" return 2; fi diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include index 12239b4e..d61ff97d 100644 --- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include @@ -46,7 +46,12 @@ run_plugin() { local pt_gpu_pci_ids=($(passthrough_pci_setup)) # setup GPU mediated device passthrough and obtain mediated device address - local pt_gpu_mdev_id=($(passthrough_mdev_setup)) + pt_gpu_mdev_id="$(passthrough_mdev_setup)" + if [ "${?}" -eq 0 ]; then + writelog "Mediated device (${pt_gpu_mdev_id}) is set up for passthrough successfully." + else + writelog "Failed to obtain created mediated device UUID!" + fi # write finalized config in debug mode to temporary folder for debugging purposes if [ "${DEBUG}" = "true" ]; then |