# ----------------------------------------------------------------------------- # Copyright (c) 2009..2012 - RZ Uni Freiburg # Copyright (c) 2009..2013 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING # # If you have any feedback please consult http://openslx.org/feedback and # send your suggestions, praise, or complaints to feedback@openslx.org # # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # run-virt.include # - component for vmware/player of the vmchooser plugin vmchooser-run_virt ################################################################################ ################################################################################ ### configuration writer functions ### This needs bash, not dash or ash! (indented HEREDOC) ################################################################################ VMWAREINCLUDEDIR=/opt/openslx/vmchooser/vmware/includes vmostype=$(rv_clean_string "$vmostype") # declaration of default variables for vmware source "${VMWAREINCLUDEDIR}/set_vmware_include_variables.inc" && set_vmware_include_variables # General global openslx config source /opt/openslx/config # TODO: Where to put global helper functions that could be used in several units below? vmw_cap_hw_version() { [ -z "$1" ] && writelog "cap_hw_version called without parameter!" && return 1 [ "$1" -lt "$maxhardwareversion" ] && maxhardwareversion="$1" } # get information from downloaded vmx source "${VMWAREINCLUDEDIR}/parse_vmx.inc" # determine limitations wrt RAM and CPU count of VM source "${VMWAREINCLUDEDIR}/determine_hardware_limitations.inc" # create file and directory structure for vmware setup source "${VMWAREINCLUDEDIR}/create_static_directory_structure.inc" # create preferences file ${vmhome}/preferences source "${VMWAREINCLUDEDIR}/create_vmhome_preferences_file.inc" && create_vmhome_preferences_file # parse the given vmx file source "${VMWAREINCLUDEDIR}/write_final_vmx.inc" # print summary - needs writelog() from vmchooser-run_virt source "${VMWAREINCLUDEDIR}/log_config_summary.inc" # For debugging cp "$conffile" "/tmp/vmware-last-config" # using the modified version of the wrapper script VIRTCMD="/opt/openslx/bin/vmplayer" VIRTCMDOPTS="${vmopt} ${conffile}"