Last week I was busy converting one of my ks.cfg scripts which I use to install vSphere 4.0 update 2 to vSphere 4.1 and I found something, which I didn’t expect from VMware..
To find the iSCSI vmhba I use the following one-liner to save it into a variable VMHBA:
VMHBA=$(/usr/sbin/esxcfg-scsidevs -a |grep “Software iSCSI” |awk ‘{print $1}’)
But the this on-liner didn’t work anymore in vSphere 4.1. So I tried to run the script part by part and started with on a vSphere 4.1 host:
/usr/sbin/esxcfg-scsidevs -a
The following output was generated:
if you run the same command on a vSphere 4.0 update 2 host, you’ll see the difference:
So to fix this part of my ks.cfg I had to change the VMHBA one-liner and change the grep phrase to “iSCSI Software Adapater” instead of “Software iSCSI”:
VMHBA=$(/usr/sbin/esxcfg-scsidevs -a |grep “iSCSI Software Adapter” |awk ‘{print $1}’)
After changing this line, my ks.cfg script runs fine again. But the question remains unanswered; why did VMware change the output of esxcfg-scsidevs –a .