diff options
author | Simon Rettberg | 2024-05-15 17:17:39 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-05-15 17:17:39 +0200 |
commit | 81288085dbb5d87ef9e92ce3a5d7b982af450590 (patch) | |
tree | 0604f2ff70767808fffca55240613a4c4f7f1023 | |
parent | [vbox-src] Run windowed in CoW admin/edit mode (diff) | |
download | mltk-81288085dbb5d87ef9e92ce3a5d7b982af450590.tar.gz mltk-81288085dbb5d87ef9e92ce3a5d7b982af450590.tar.xz mltk-81288085dbb5d87ef9e92ce3a5d7b982af450590.zip |
[qemu] Use virt-manager if CoW admin/edit mode is active
3 files changed, 15 insertions, 1 deletions
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 391ba5a5..2cd2c60e 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 @@ -116,6 +116,9 @@ run_plugin() { if $DEBUG; then VIRTCMDOPTS+=( "-xmledit" ) fi + if notempty DMSD_COW_SESSION; then + VIRTCMDOPTS+=( "-manager" ) + fi if [ "${SHARE_REMAP_MODE}" -gt 1 ]; then notempty HOME_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc0" "${HOME_SHARE_PATH}" ) diff --git a/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java index 0744c9b5..6e1efa61 100644 --- a/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java +++ b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java @@ -237,7 +237,7 @@ public class App vmViewer = new ViewerLookingGlassClient( vm, hypervisor, cmdLn.isDebugEnabled() ); } else { // viewer for non-GPU passthrough (no framebuffer access) is required - if ( cmdLn.isDebugEnabled() ) { + if ( cmdLn.isDebugEnabled() || cmdLn.isManagerEnabled() ) { // create specific Virtual Machine Manager viewer if debug mode is enabled vmViewer = new ViewerVirtManager( vm, hypervisor ); } else { diff --git a/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/cmdln/CommandLineArgs.java b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/cmdln/CommandLineArgs.java index 396c0d8c..1236a997 100644 --- a/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/cmdln/CommandLineArgs.java +++ b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/cmdln/CommandLineArgs.java @@ -171,6 +171,16 @@ public class CommandLineArgs } /** + * Returns the presence of the command line option {@link CmdLnOption#MANAGER}. + * + * @return presence of the command line option {@link CmdLnOption#MANAGER}. + */ + public boolean isManagerEnabled() + { + return this.cmdLn.hasOption( CmdLnOption.MANAGER.getShortOption() ); + } + + /** * Returns the state of the command line option {@link CmdLnOption#DEBUG_PTH}. * * @return state of the command line option {@link CmdLnOption#DEBUG_PTH}. @@ -526,6 +536,7 @@ public class CommandLineArgs + " for testing and debugging purposes"), VM_CPU_TOPO ( '1', "cputopo", 1, "Set pairs of CPUs belonging to the same thread, semi-colon separated." + " Each group can contain commas or dashes to mark ranges. E.g. 0,1;2-3;4;5;6;7;8,9,10,11" ), + MANAGER ( '2', "manager", 0, "Force using virt-manager even if not in debug mode" ), VM_MAC0 ( 'a', "vmmac0", 1, "MAC address for the first network interface" ), DEBUG ( 'b', "debug", 1, "Enable or disable debug mode" ), VM_NCPUS ( 'c', "vmncpus", 1, "Number of virtual CPUs for the virtual machine" ), |