VMware – How to setup Software iSCSI with ESXCLI

To configure Software iSCSI, it can be done via HTML5 Web UI. But when you need to setup or configure Software iSCSI for many esxi host, it will take long time to do via HTML5 Web UI.

This job can be speed by setting up Software iSCSI with esxcli command line tool.

Below are most common esxcli command that i used to setup Software iSCSI

1) Enable software iSCSI


esxcli iscsi software set -e true

2) To view host’s iSCSI adapter


esxcli iscsi adapter list

3) Rename the ISCSI adapter IQN according to your desired name


esxcli iscsi adapter set -n <insertNewIQNname> -A vmhbaxx

4) Check status of Software iSCSI


esxcli iscsi software get

Note: true=iSCSI Enable ; false=iSCSI Disable

5) Add dynamic discovery address

Note: with dynamic discovery, all storage targets associated with a host name or IP Address will be discovered.


esxcli iscsi adapter discovery sendtarget add –address=<IP/FQDN[:port]> –adapter=<adapter_name>


esxcli iscsi adapter discovery sendtarget add –address= –adapter=vmhba64

6) List iSCSI targets with IP and Port


esxcli iscsi adapter target portal list

7) Re-discover and re-scan iSCSI adapters


esxcli iscsi adapter discovery rediscover -A adapter_name

esxcli storage core adapter rescan -A adapter_name

8) List the mounted VMFS volumes


esxcli storage vmfs extent list

Leave a Reply

Your email address will not be published. Required fields are marked *