Today i have been playing around a bit with vCli (http://www.vmware.com/support/developer/vcli/) as part of the preparation of the VCAP-DCA exam.
It's fun, and it's quite straightforward as soon as you start working with it.
Here are the commands i used to add iSCSI storage to server esxi3:
iSCSI configuration with vCli
Enable iSCSI:
vicfg-iscsi.pl --server esxi3 --username root --password <password> --swiscsi -e
List iSCSI adapters:
vicfg-iscsi.pl --server esxi3 --username root --password <password> --adapter --list
In this case: vmhba33
Configure discovery:
vicfg-iscsi.pl --server esxi3 --username root --password <password> --add --discovery --ip 192.168.38.250 vmhba33
192.168.38.250 is the IP-address of the FreeNAS iSCSI server i use for this case.
Rescan vmhba33:
vicfg-rescan.pl --server esxi3 --username root --password <password> vmhba33
Et voila, after the rescan the iSCSI-storage is visible in vCenter