From d8d04f2e8d89481e3ee1b12499fc55e21478f73b Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Wed, 30 Jun 2021 12:05:14 +0200 Subject: [qemu] Add link to main Java class into the Manifest (Jar archive) --- core/modules/qemu/runvirt-plugin-qemu/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/modules/qemu/runvirt-plugin-qemu/pom.xml b/core/modules/qemu/runvirt-plugin-qemu/pom.xml index d8bb9743..36f62796 100644 --- a/core/modules/qemu/runvirt-plugin-qemu/pom.xml +++ b/core/modules/qemu/runvirt-plugin-qemu/pom.xml @@ -12,6 +12,7 @@ https://git.openslx.org/openslx-ng/mltk.git/ + org.openslx.runvirt.plugin.qemu.App UTF-8 1.8 1.8 @@ -145,6 +146,13 @@ + + + ${main.class} + true + true + + jar-with-dependencies -- cgit v1.2.3-55-g7522 From ef2ba4842a74f7a40770d33f3ae083aa69d86053 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Wed, 30 Jun 2021 12:08:20 +0200 Subject: [qemukvm] Remove old and unused 'qemukvm' module --- .../data/opt/openslx/scripts/systemd-qemukvm_env | 28 ----------- .../qemukvm/includes/finalize_start_command.inc | 49 -------------------- .../plugins/qemukvm/includes/init_core.inc | 54 ---------------------- .../vmchooser/plugins/qemukvm/run-virt.include | 44 ------------------ 4 files changed, 175 deletions(-) delete mode 100755 core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env delete mode 100644 core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/finalize_start_command.inc delete mode 100644 core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/init_core.inc delete mode 100644 core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include diff --git a/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env b/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env deleted file mode 100755 index 7717394d..00000000 --- a/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/ash -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2017..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to support@bwlehrpool.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# systemd-qemukvm_env -# - This is the preparation script for the configuration of Linux Qemu/KVM. -################################################################################ - -# lazy load all kvm related modules -modprobe kvm -modprobe kvm_amd -modprobe kvm_intel - -if [ ! -e /dev/kvm ]; then - slxlog "qemukvm-modules" "/dev/kvm not found! Missing kvm kernel module(s)?" - exit 1 -fi - diff --git a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/finalize_start_command.inc b/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/finalize_start_command.inc deleted file mode 100644 index eff764fe..00000000 --- a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/finalize_start_command.inc +++ /dev/null @@ -1,49 +0,0 @@ -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2009..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to support@bwlehrpool.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# run-virt.include -# - Include script for running the QEMU/Linux KVM virtual machine on an -# OpenSLX client via the run-virt.sh or run-vmgrid.sh -################################################################################ - -# set options that depend on previous includes -# and build the final start command -finalize_start_command() { - - # set cpu type - VIRTCMDOPTS+=( "-cpu" "host" ) - # set cpu cores - VIRTCMDOPTS+=( "-smp" "${CPU_CORES}" ) - - # set RAM - VIRTCMDOPTS+=( "-m" "${VM_MEM}" ) - - # special feature for real and virtual floppy disks - isset FLOPPY_0 && VIRTCMDOPTS+=( "-fda" "${FLOPPY_0}" ) - isset SLX_FLOPPY_IMG && VIRTCMDOPTS+=( "-fdb" "${SLX_FLOPPY_IMG}" ) - - # add optical drive if available - isset CDROM_0 && VIRTCMDOPTS+=( "-cdrom" "${CDROM_0}" ) - - # audio - isset SOUND_DEV && VIRTCMDOPTS+=( "-soundhw" "${SOUND_DEV}" ) - - # serial devices TODO test - if isset SERIAL_PORTS; then - for DEV in $SERIAL_PORTS; do - : # buggeh: VIRTCMDOPTS+=( "-serial" "${DEV}" ) - done - fi -} - -call_post_source finalize_start_command diff --git a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/init_core.inc b/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/init_core.inc deleted file mode 100644 index 53f214bd..00000000 --- a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/init_core.inc +++ /dev/null @@ -1,54 +0,0 @@ -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2009..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to support@bwlehrpool.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# run-virt.include -# - Include script for running the QEMU/Linux KVM virtual machine on an -# OpenSLX client via the run-virt.sh or run-vmgrid.sh -################################################################################ - -# check if kvm kernel module are available -if [ ! -c /dev/kvm ]; then - writelog "KVM kernel modules not loaded!" - EXIT_TYPE="internal" EXIT_REASON="QEMU/KVM Virtualisierer nicht initialisiert!" cleanexit 1 -fi - -# check if qemu binaries are available -if ! check_dep qemu-system-{i386,x86_64}; then - writelog "QEMU binaries not available!" - EXIT_TYPE="internal" EXIT_REASON="QEMU/KVM Virtualisierer nicht initialisiert!" cleanexit 1 -fi - -# set general purpose options here, mostly evaluates information -# contained in /opt/openslx/vmchooser/config/virtualization.conf - -# TODO some options should come from the server, in particular -# - disk controller type (virtio, scsi, ide...) -# - arch to emulate (x86_64, i386, ...) -# - graphics mode? -# - sound dev? -# - tbd - -# display name, remove blanks because of cmdline problems -declare -rg CMD_DISPLAYNAME=$(echo ${VM_DISPLAYNAME} | sed -e "s, ,-,g;s,(,[,g;s,),],g") -VIRTCMDOPTS+=( "-name" "${CMD_DISPLAYNAME}" ) - -# graphical start: vga, vmware, qxl, spice? -VIRTCMDOPTS+=( "-vga" "std" "-full-screen" ) - -# hot keys ALT+CTRL+SHIFT (does not work properly!?) -VIRTCMDOPTS+=( "-alt-grab" ) - -# TODO support other types of boot? any usecase for network boot? -# for now just boot from disk -VIRTCMDOPTS+=( "-boot" "c" ) - diff --git a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include b/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include deleted file mode 100644 index a1a41499..00000000 --- a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include +++ /dev/null @@ -1,44 +0,0 @@ -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2009..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to support@bwlehrpool.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# run-virt.include -# - qemu/kvm plugin for vmchooser run-virt -################################################################################ - -# BASH_SOURCE[0] contains the file being sourced, namely this one -declare -rg QEMUKVM_PLUGIN_DIR="$(dirname "${BASH_SOURCE[0]}")" -declare -rg QEMUKVM_INCLUDE_DIR="${QEMUKVM_PLUGIN_DIR}/includes" - -# TODO make this part of the metadata coming from the server -# TBD: "firewall printer usb slxfloppy sound netshares" -declare -rg PLUGIN_FEATURES="slxfloppy" - -run_plugin() { - # declaration of default functions and variables for vmware - $(safesource --exit "${QEMUKVM_INCLUDE_DIR}/init_core.inc") - - # determine limitations wrt RAM and CPU count of VM - $(safesource "${QEMUKVM_INCLUDE_DIR}/determine_hardware_limitations.inc") - - # setup networking - $(safesource "${QEMUKVM_INCLUDE_DIR}/setup_network.inc") - - # setup rw layer for ro image - $(safesource "${QEMUKVM_INCLUDE_DIR}/setup_rw_layer.inc") - - # build the final start command - $(safesource "${QEMUKVM_INCLUDE_DIR}/finalize_start_command.inc") - - # print summary - needs writelog() from vmchooser-run_virt - $(safesource "${QEMUKVM_INCLUDE_DIR}/log_config_summary.inc") -} -- cgit v1.2.3-55-g7522 From ce70735f9304e859e6c3c48f8c17238602f527dd Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Wed, 30 Jun 2021 12:14:28 +0200 Subject: [qemu] Fix setting of cmdln options for the QEMU runvirt plugin --- .../vmchooser/plugins/qemu/run-virt.include | 45 +++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include index b7e43df9..99be4dac 100644 --- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include @@ -27,27 +27,28 @@ run_plugin() { local vm_final_run_file="/tmp/qemu-last-config.xml" # call the Libvirt Java tool to finalize configuration and start VM - declare -rg VIRTCMD="java -jar /opt/openslx/share/java/runvirt-plugin-qemu.jar" + declare -rg VIRTCMD="java" + VIRTCMDOPTS=( "-jar" "/opt/openslx/share/java/runvirt-plugin-qemu.jar" ) - isset DEBUG && VIRTCMDOPTS+=( "-debug" "${DEBUG}" ) - isset VM_CLEANNAME && VIRTCMDOPTS+=( "-vmname" "${VM_CLEANNAME}" ) - isset VM_DISPLAYNAME && VIRTCMDOPTS+=( "-vmdsplname" "${VM_DISPLAYNAME}" ) - isset VM_OS_TYPE && VIRTCMDOPTS+=( "-vmos" "${VM_OS_TYPE}" ) - isset VM_RUN_FILE && VIRTCMDOPTS+=( "-vmcfginp" "${VM_RUN_FILE}" ) - isset vm_final_run_file && VIRTCMDOPTS+=( "-vmcfgout" "${vm_final_run_file}" ) - isset IMGUUID && VIRTCMDOPTS+=( "-vmuuid" "${IMGUUID}" ) - isset CPU_CORES && VIRTCMDOPTS+=( "-vmncpus" "${CPU_CORES}" ) - isset VM_MEM && VIRTCMDOPTS+=( "-vmmem" "${VM_MEM}" ) - isset VM_MAC_ADDR && VIRTCMDOPTS+=( "-vmmac0" "${VM_MAC_ADDR}" ) - isset VM_DISKFILE_RO && VIRTCMDOPTS+=( "-vmhdd0" "${VM_DISKFILE_RO}" ) - isset FLOPPY_0 && VIRTCMDOPTS+=( "-vmfloppy0" "${FLOPPY_0}" ) - isset SLX_FLOPPY_IMG && VIRTCMDOPTS+=( "-vmfloppy1" "${SLX_FLOPPY_IMG}" ) - isset CDROM_0 && VIRTCMDOPTS+=( "-vmcdrom0" "${CDROM_0}" ) - isset CDROM_1 && VIRTCMDOPTS+=( "-vmcdrom1" "${CDROM_1}" ) - isset SERIAL0 && VIRTCMDOPTS+=( "-vmserial0" "${SERIAL0}" ) - isset PARALLEL0 && VIRTCMDOPTS+=( "-vmparallel0" "${PARALLEL0}" ) - isset HOME_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc0" "${HOME_SHARE_PATH}" ) - isset HOME_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt0" "${HOME_SHARE_NAME}" ) - isset COMMON_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc1" "${COMMON_SHARE_PATH}" ) - isset COMMON_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt1" "${COMMON_SHARE_NAME}" ) + notempty DEBUG && VIRTCMDOPTS+=( "-debug" "${DEBUG}" ) + notempty VM_CLEANNAME && VIRTCMDOPTS+=( "-vmname" "${VM_CLEANNAME}" ) + notempty VM_DISPLAYNAME && VIRTCMDOPTS+=( "-vmdsplname" "${VM_DISPLAYNAME}" ) + notempty VM_OS_TYPE && VIRTCMDOPTS+=( "-vmos" "${VM_OS_TYPE}" ) + notempty VM_RUN_FILE && VIRTCMDOPTS+=( "-vmcfginp" "${VM_RUN_FILE}" ) + notempty vm_final_run_file && VIRTCMDOPTS+=( "-vmcfgout" "${vm_final_run_file}" ) + notempty IMGUUID && VIRTCMDOPTS+=( "-vmuuid" "${IMGUUID}" ) + notempty CPU_CORES && VIRTCMDOPTS+=( "-vmncpus" "${CPU_CORES}" ) + notempty VM_MEM && VIRTCMDOPTS+=( "-vmmem" "${VM_MEM}" ) + notempty VM_MAC_ADDR && VIRTCMDOPTS+=( "-vmmac0" "${VM_MAC_ADDR}" ) + notempty VM_DISKFILE_RO && VIRTCMDOPTS+=( "-vmhdd0" "${VM_DISKFILE_RO}" ) + notempty FLOPPY_0 && VIRTCMDOPTS+=( "-vmfloppy0" "${FLOPPY_0}" ) + notempty SLX_FLOPPY_IMG && VIRTCMDOPTS+=( "-vmfloppy1" "${SLX_FLOPPY_IMG}" ) + notempty CDROM_0 && VIRTCMDOPTS+=( "-vmcdrom0" "${CDROM_0}" ) + notempty CDROM_1 && VIRTCMDOPTS+=( "-vmcdrom1" "${CDROM_1}" ) + notempty SERIAL0 && VIRTCMDOPTS+=( "-vmserial0" "${SERIAL0}" ) + notempty PARALLEL0 && VIRTCMDOPTS+=( "-vmparallel0" "${PARALLEL0}" ) + notempty HOME_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc0" "${HOME_SHARE_PATH}" ) + notempty HOME_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt0" "${HOME_SHARE_NAME}" ) + notempty COMMON_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc1" "${COMMON_SHARE_PATH}" ) + notempty COMMON_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt1" "${COMMON_SHARE_NAME}" ) } -- cgit v1.2.3-55-g7522 From e0c7ae0a14a1a2e5b931ebde97d11f7ca936046d Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Wed, 30 Jun 2021 12:27:43 +0200 Subject: [qemu] Change location of the runvirt Java plugin --- .../qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include | 2 +- core/modules/qemu/module.build | 2 +- core/modules/qemu/module.conf | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include index 99be4dac..d8aef1ae 100644 --- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include @@ -28,7 +28,7 @@ run_plugin() { # call the Libvirt Java tool to finalize configuration and start VM declare -rg VIRTCMD="java" - VIRTCMDOPTS=( "-jar" "/opt/openslx/share/java/runvirt-plugin-qemu.jar" ) + VIRTCMDOPTS=( "-jar" "/opt/openslx/vmchooser/plugins/qemu/runvirt-plugin-qemu.jar" ) notempty DEBUG && VIRTCMDOPTS+=( "-debug" "${DEBUG}" ) notempty VM_CLEANNAME && VIRTCMDOPTS+=( "-vmname" "${VM_CLEANNAME}" ) diff --git a/core/modules/qemu/module.build b/core/modules/qemu/module.build index 4d86de96..d2ccb921 100644 --- a/core/modules/qemu/module.build +++ b/core/modules/qemu/module.build @@ -15,7 +15,7 @@ build() { # install qemu runvirt plugin local build_artifact_filename="runvirt-plugin-qemu-1.0-SNAPSHOT.jar" - local install_dir="${MODULE_BUILD_DIR}/opt/openslx/share/java" + local install_dir="${MODULE_BUILD_DIR}/opt/openslx/vmchooser/plugins/qemu" local install_filename="runvirt-plugin-qemu.jar" mkdir -p "${install_dir}" cp "${build_dir}/target/${build_artifact_filename}" "${install_dir}/${install_filename}" || perror "Could not install runvirt-plugin-qemu!" diff --git a/core/modules/qemu/module.conf b/core/modules/qemu/module.conf index c1cdf05d..1914cffe 100644 --- a/core/modules/qemu/module.conf +++ b/core/modules/qemu/module.conf @@ -8,3 +8,7 @@ REQUIRED_MODULES=" REQUIRED_BINARIES="" REQUIRED_LIBRARIES="" REQUIRED_DIRECTORIES="" + +REQUIRED_FILES=" + /opt/openslx/vmchooser/plugins/qemu/runvirt-plugin-qemu.jar +" -- cgit v1.2.3-55-g7522 From e5e0f36e2e9ae6fbf90ba926d4689114b9576e1c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 30 Jun 2021 12:28:44 +0200 Subject: [run-virt] Fix sed expression for VM_CLEANNAME generation --- .../opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc index ff5c736c..b4ab4c1c 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/get_xml_file_variables.inc @@ -49,7 +49,7 @@ parse_xml() { readonly VM_DISPLAYNAME # Define VM_CLEANNAME since VM_DISPLAYNAME can be long and contain weird characters - declare -rg VM_CLEANNAME=$(echo "${VM_DISPLAYNAME:0:32}" | sed -r 's/[^0-9a-zA-Z_-\.]+/_/g') + declare -rg VM_CLEANNAME=$(echo "${VM_DISPLAYNAME:0:32}" | sed -r 's/[^0-9a-zA-Z_\-\.]+/_/g') # image is for the following virtual machine declare -rg PLUGIN_ID=$(get_xml "virtualmachine") -- cgit v1.2.3-55-g7522 From d4955a9777f59da44934c4abdde34f85e9706fa6 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 30 Jun 2021 12:53:40 +0200 Subject: [run-virt] README: SHARE_REMAP_MODE --- core/modules/run-virt/README | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/modules/run-virt/README b/core/modules/run-virt/README index 2f300630..b04dd07e 100644 --- a/core/modules/run-virt/README +++ b/core/modules/run-virt/README @@ -35,6 +35,13 @@ from $VMCHOOSER_DIR/plugins/$PLUGIN_ID/* Absolute path to the main run-virt script. Should usually be /opt/openslx/vmchooser/vmchooser-run_virt +# $SHARE_REMAP_MODE +How to map network shares into guest +0 = disabled +1 = mount normally in guest (openslx.exe) +2 = mount normally in gues, but fall back to shared folders if it fails +3 = use shared folders feature of virtualizer + # $SRC_IMG_ABSOLUTE Absolute path to the VMs HDD image. When using DNBD3, which requires $SRC_IMG_RELATIVE to be set, this file might not actually exist. -- cgit v1.2.3-55-g7522 From 52e662da9aa055bf45e85b7212e17543b2a74e05 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Wed, 30 Jun 2021 12:57:40 +0200 Subject: [qemu] Enable shared folders if global support is active --- .../data/opt/openslx/vmchooser/plugins/qemu/run-virt.include | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include index d8aef1ae..c9d2856c 100644 --- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include @@ -47,8 +47,11 @@ run_plugin() { notempty CDROM_1 && VIRTCMDOPTS+=( "-vmcdrom1" "${CDROM_1}" ) notempty SERIAL0 && VIRTCMDOPTS+=( "-vmserial0" "${SERIAL0}" ) notempty PARALLEL0 && VIRTCMDOPTS+=( "-vmparallel0" "${PARALLEL0}" ) - notempty HOME_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc0" "${HOME_SHARE_PATH}" ) - notempty HOME_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt0" "${HOME_SHARE_NAME}" ) - notempty COMMON_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc1" "${COMMON_SHARE_PATH}" ) - notempty COMMON_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt1" "${COMMON_SHARE_NAME}" ) + + if [ "${SHARE_REMAP_MODE}" -gt 1 ]; then + notempty HOME_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc0" "${HOME_SHARE_PATH}" ) + notempty HOME_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt0" "${HOME_SHARE_NAME}" ) + notempty COMMON_SHARE_PATH && VIRTCMDOPTS+=( "-vmfssrc1" "${COMMON_SHARE_PATH}" ) + notempty COMMON_SHARE_NAME && VIRTCMDOPTS+=( "-vmfstgt1" "${COMMON_SHARE_NAME}" ) + fi } -- cgit v1.2.3-55-g7522