From 16d888935a0f9eb566b51093ca326a4fd3067bce Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Fri, 20 Mar 2009 00:38:52 +0000 Subject: Possible fix for #400 issue ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2744 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/vmware/files/run-virt.include | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'os-plugins/plugins/vmware/files/run-virt.include') diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index 62a7bc71..72037f5f 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -290,9 +290,11 @@ 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=$(grep -m1 -ia "ddb.adapterType" ${diskfile} | awk -F '"' '{print $2}') - hwver=$(grep -m1 -ia "ddb.virtualHWVersion" ${diskfile} | \ + 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 ide="TRUE" -- cgit v1.2.3-55-g7522