VMware Cloud Community
bcetinich
Contributor
Contributor

vicfg-iscsi esxcfg-iscsi esxi 4.1

Is there a command line esxcfg-iscsi alternative to vicfg-iscsi

I am trying to add my discovery IPs to the initiators as part of a kickstart script.

I am using ESXi 4.1 U1

Currently from the VMA command is

vicfg-iscsi -D -a -i 162.23.235.61 vmhba39

I would like to use

esxcfg-iscsi -D -a -i 162.23.235.61 vmhba39

Tags (2)
0 Kudos
4 Replies
Dave_Mishchenko
Immortal
Immortal

Take a look at esxcli -

~ # esxcli swiscsi
Missing required <object> and <command>

Usage: esxcli [disp options] swiscsi <object> <command>

For esxcli help please run esxcli --help

Available objects:

nic      Operations that can be performed on iSCSI NICs
session  Operations that can be performed on iSCSI sessions
vmknic   Operations that can be performed on iSCSI vmknics
vmnic    Operations that can be performed on iSCSI vmnics

0 Kudos
lamw
Community Manager
Community Manager

There's not an equivalent of this command on the Busybox Console of ESXi, just esxcfg-swiscsi which gives very basic iSCSI administration.

If you wanted another utility that allowed you to configured iSCSI, take a look at using vim-cmd which does provide some advanced management capabilities including iSCSI configurations:

~ # vim-cmd hostsvc/storage
Commands available under hostsvc/storage/:
diagnostic/                 multipath_lun_setpolicy
mockup/                     multipath_path_disable
provider/                   multipath_path_enable
datastore_browser_search    partition_get
fs_info                     partition_layout_add
hba_info                    partition_layout_get
hba_rescan                  partition_layout_set
info                        partition_remove
iscsi_add_send_target       partition_spec_add
iscsi_add_static_target     partition_spec_get
iscsi_disable_chap          refresh
iscsi_discovery             scsilun_info
iscsi_enable_chap           software_iscsi_enabled
iscsi_ip_config             topology_info
iscsi_ip_use_dhcp           upgrade_vm_layout
iscsi_remove_send_target    vmfs_attach_extent
iscsi_remove_static_target  vmfs_format
iscsi_set_alias             vmfs_rescan
iscsi_set_name              vmfs_upgrade
multipath_info

Pretty much any of the iscsi_* sub-commands is what you'll want to focus on. Here's a quick primer about vimsh if you've never heard of it.

0 Kudos
bcetinich
Contributor
Contributor

I am not using software iSCSI, I am using the a dependant iSCSI adapter, (Broadcom iSCSI adapter BNX2i)

I will take a look at this hostsvc/storage/iscsi_add_send_target and report back, this sound like what I am looking for

Thanks

0 Kudos
bcetinich
Contributor
Contributor

Thanks all for reading and responding.

So to do it you do this.

vim-cmd hostsvc/storage/iscsi_add_send_target vmhba36 172.22.2.2

0 Kudos