From 9714b81ed8c96cea4276c61d73a5e0b6f3536b9c Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Tue, 12 Oct 2021 17:03:12 +0200 Subject: [virt-manager] Enable automatic resize of guest system --- .../opt/openslx/vmchooser/plugins/qemukvm/run-virt.include | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'core/modules/qemu') 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 fd251f04..1f61f5d9 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 @@ -54,9 +54,20 @@ run_plugin() { writelog "Failed to set up mediated device (Intel GVT-g) for GPU passthrough!" fi - # write finalized config in debug mode to temporary folder for debugging purposes + # set debug related options if [ "${DEBUG}" = "true" ]; then + # write finalized config in debug mode to temporary folder for debugging purposes local vm_final_config="/tmp/qemu-last-config.xml" + + # set configuration for virt-manager + local GSETTINGS_SCHEMA_NAME_PREFIX="org.virt-manager.virt-manager" + local GSETTINGS_SCHEMA_PATH_PREFIX="/org/virt-manager/virt-manager" + + # per VM relocatable virt-manager settings + # scale a VM's output in fullscreen to fit the virt-manager's console size + gsettings set "${GSETTINGS_SCHEMA_NAME_PREFIX}.vm:${GSETTINGS_SCHEMA_PATH_PREFIX}/vm/" "scaling" "1" + # automatic resize of VM resolution to virt-manager's console resolution + gsettings set "${GSETTINGS_SCHEMA_NAME_PREFIX}.vm:${GSETTINGS_SCHEMA_PATH_PREFIX}/vm/" "resize-guest" "1" fi # call the Libvirt Java tool to finalize configuration and start VM -- cgit v1.2.3-55-g7522