diff options
author | Michael Janczyk | 2009-03-20 16:53:57 +0100 |
---|---|---|
committer | Michael Janczyk | 2009-03-20 16:53:57 +0100 |
commit | d02762d84cf473207cc924a7c3508a7b0f16ea00 (patch) | |
tree | 9b80a34a647aaf89473fddf4050b7349d0e5976f /os-plugins/plugins/vmware/files/run-virt.include | |
parent | * in an attempt to solve #399 (and #398), we now mount the host's perl core (diff) | |
download | core-d02762d84cf473207cc924a7c3508a7b0f16ea00.tar.gz core-d02762d84cf473207cc924a7c3508a7b0f16ea00.tar.xz core-d02762d84cf473207cc924a7c3508a7b0f16ea00.zip |
vmchooser: if you start from a dm you do not want to hear that a dm is already started
vmware: shorter check for vmware-images. check for flat images removed, because now only the first 30 lines are checked. and flat images can't be started without a header-vmdk anyway.
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2750 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmware/files/run-virt.include')
-rw-r--r-- | os-plugins/plugins/vmware/files/run-virt.include | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index 72037f5f..f74a4b63 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -288,25 +288,22 @@ vmversion=$version vmopt="-X" # check if ide/scsi and hwver of image -# *-flat.vmdk images are started via the vmdk file, so there's no need to -# exclude these flat files, we do it anyway -# read the first 22 lines otherwise it takes too much time (see #400) -if [ $(echo ${imagename} | grep -cv "\-flat.vmdk") ]; then - hddrv=$(head -22 ${diskfile} | grep -m1 -ia "ddb.adapterType" |\ - awk -F '"' '{print $2}') - hwver=$(head -22 ${diskfile} | grep -m1 -ia "ddb.virtualHWVersion" |\ - awk -F '"' '{print $2}') - if [ "${hddrv}" = "ide" ]; then +# read only the first 30 lines to be shure +imghead=$(head -30 ${diskfile}) +hddrv=$(echo "${imghead}" | grep -m1 -ia "ddb.adapterType" |\ + awk -F '"' '{print $2}') +hwver=$(echo "${imghead}" | grep -m1 -ia "ddb.virtualHWVersion" |\ + awk -F '"' '{print $2}') +case "${hddrv}" in + ide) ide="TRUE" scsi="FALSE" - elif [ "${hddrv}" = "lsilogic" ]; then - ide="FALSE" - scsi="TRUE" - elif [ "${hddrv}" = "buslogic" ]; then + ;; + lsilogic|buslogic) ide="FALSE" - scsi="TRUE" - fi -fi + scsi="TRUE" + ;; +esac ### log function ############################################################### # function to write to stdout and logfile |