diff options
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 1 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/files/run-virt.include | 36 |
2 files changed, 28 insertions, 9 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index 8c1ccabe..ee9c8124 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -86,6 +86,7 @@ vmostype=$(grep -io "<os param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') # Definition of the networking the client system is connected to network_kind=$(grep -io "<network param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') +network_card=$(grep -io "<netcard param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') # Serial/parallel ports defined (e.g. "ttyS0" or "autodetect") serial=$(grep -io "<serialport param=.*\"" ${xml} | awk -F "\"" '{ print $2 }') diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index f20b8d65..8b55523c 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -98,7 +98,7 @@ floppy1.fileName = \"${floppy1name}\" # nics ethernet0.present = \"TRUE\" ethernet0.addressType = \"static\" -#ethernet0.virtualDev = \"e1000\" +${network_virtualDev} ethernet0.connectionType = \"${network_kind}\" #ethernet1.connectionType = \"custom\" #ethernet1.vnet = \"/dev/vmnet2\" @@ -224,6 +224,13 @@ vmopt="-X" # hardware checks ################################################################################ +# use different network card +if [ -n "${network_card}" ]; then + network_virtualDev='ethernet0.virtualDev = \"e1000\"' +else + network_virtualDev='# using default virtualDev for ethernet0' +fi + # enable 3D enable3d=$(grep -i "<enable3d param=.*" ${xml} 2>/dev/null | \ awk -F '=' {'print $2'}) @@ -247,7 +254,7 @@ case "$serial" in serial="TRUE" ;; *) - serialdev="" + serialdev="# no serial port configured" serial="FALSE" ;; esac @@ -263,7 +270,7 @@ case "$parallel" in parallel="TRUE" ;; *) - paraldev="" + paraldev="# no parallel port configured" paralbidi="FALSE" parallel="FALSE" ;; @@ -392,7 +399,7 @@ if [ "${mem}" -lt "256" ] || [ "${memhost}" -lt "256" ]; then exit 1 fi -# Write all results to logfile +# write all results to logfile # log disksetup writelog "Directories:" writelog "\tConfdir:\t${confdir}" @@ -402,27 +409,38 @@ writelog "\tVMhome:\t\t${vmhome}" writelog "\tLogfile:\t${logfile}" writelog "\t/tmp info: \ $(grep "/tmp " /proc/mounts) $(df -h | grep " /tmp$" | awk '{print $2}')" -# HW setup +# hw setup writelog "Hardware:" writelog "\tMAC:\t\t00:50:56:0D:${mac}" +if [ -n "${network_card}" ]; then + writelog "\tNet Adaptor:\t${network_card}" +fi writelog "\tMem:\t\t${mem} MB" writelog "\tHostmem:\t${memhost} MB" writelog "\tMax. res.:\t${xres}x${yres}" writelog "\tCD-ROM1:\t${cdrom0}" writelog "\tCD-ROM2:\t${cdrom1}" writelog "\tFloppy_A:\t${floppy0}" -# Image +if [ "${serial}" = "TRUE" ]; then + writelog "\tSerial Port:\t${serialdev}" +fi +if [ "${parallel}" = "TRUE" ]; then + writelog "\tParallel Port:\t${paraldev}" +fi +# image writelog "Diskimage:" writelog "\tDiskfile:\t${diskfile}" writelog "\tDisktype:\t${hddrv}" writelog "\tHWVersion:\t${hwver}" writelog "\tVMostype:\t${vmostype}" +# misc +writelog "Misc:" +writelog "\tDisplayname:\t${displayname}" if [ "${cap3d}" = "TRUE" -a "${enable3d}" = "TRUE" ]; then writelog "\t3D Graphics:\tenabled" -else - writelog "\t3D Graphics:\tdisabled" fi -writelog "\tDisplayname:\t${displayname}\n" +# empty line at end +writelog "" # finally set env for run-virt.sh |