diff options
| author | Christian Rößler | 2018-06-04 10:51:04 +0200 |
|---|---|---|
| committer | Christian Rößler | 2018-06-04 10:51:04 +0200 |
| commit | 80a49d39b52078d0994ec0625e710bb42628c51d (patch) | |
| tree | d9c92333c178a18294c7ae84f2d6cae259e174eb /core/modules/run-virt/data/opt | |
| parent | [run-virt] resolution modeline detection (diff) | |
| parent | [pvs2] Only catch SEGV (diff) | |
| download | mltk-80a49d39b52078d0994ec0625e710bb42628c51d.tar.gz mltk-80a49d39b52078d0994ec0625e710bb42628c51d.tar.xz mltk-80a49d39b52078d0994ec0625e710bb42628c51d.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/mltk
Diffstat (limited to 'core/modules/run-virt/data/opt')
| -rwxr-xr-x | core/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt | 5 | ||||
| -rw-r--r-- | core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt b/core/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt index 96a47ea6..307b6872 100755 --- a/core/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt +++ b/core/modules/run-virt/data/opt/openslx/scripts/vmchooser-run_virt @@ -31,6 +31,11 @@ launch_runvirt() { # script exited here, check for exit code and send logfile to sat if appropriate local RUNVIRT_RET="$?" if [ ${RUNVIRT_RET} -ne 0 ]; then + if [ ${RUNVIRT_RET} -eq 141 ]; then + # 141 happens on alt + print screen + k or upon automatic logout via systemd + # just sleep here to avoid these annoying (and misleading) slxlogs.... + sleep 3 + fi [ -f "${LOGFILE}" ] && log "Runvirt failed with '${RUNVIRT_RET}'." return 1 fi diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc index c59a82b0..19e1cb43 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc @@ -13,15 +13,15 @@ # Use: 00:FF:00 for firtual machines ;) ## Functions ## +# Import /run/hwinfo variables +import_hwinfo() { + $(safesource "/run/hwinfo") +} # Sets the VM's hostname to the original hostname prefixed with a fixed string and its ID set_virt_hostname() { declare -rg HOSTNAME="virt${VM_ID}-$(hostname)" writelog "\tVM Hostname:\t\t$HOSTNAME" } -set_virt_cpu() { - # Make sure CPU_CORES is not empty - declare -g CPU_CORES=${CPU_CORES:-"1"} -} # Derives the amount of memory allocated to the VM from the # host's total memory (previously determined by systemd-run_virt_env) set_virt_memory() { @@ -149,7 +149,7 @@ set_serial_ports() { ## MAIN ## call_post_source \ - set_virt_cpu \ + import_hwinfo \ set_virt_memory \ set_virt_mac \ set_virt_hostname \ |
