vicfg-iscsi - manage iSCSI storage.
vicfg-iscsi [<connection_options>] [option] [suboption] [parameter] [<adapter_name>]
Option is one of
--discovery, --static,--authentication, --phba,
--target, --lun, --network (Hardware iSCSI only),
--pnp (Hardware iSCSI only), --iscsiname,
--parameter, --swiscsi, --adapter.
Suboption is one of
--list, --add, --remove.
Parameters differ depend on the suboption used.
<adapter_name> is required unless you specify the --help, --swiscsi, or
--adapter option.
vicfg-iscsi supports configuration and property retrieval for software or hardware iSCSI initiators. See the vSphere Command-Line Interface Installation and Scripting Guide for more information.
Specifies the target server and authentication information if required. Run vicfg-iscsi --help
for a list of all connection options.
Prints a help message for each command-specific and each connection option.
Calling the script with no arguments or with --help has the same effect.
Returns a list of discovery addresses and static targets and related properties if configured.
Adds a discovery address, by using <ip_addr> or <domain_name> and optional <port_num>, if <port_num> is not specified, uses 3260 as default.
Removes a discovery address, by using <ip_addr> or <domain_name> and optional <port_num>, if <port_num> is not specified, uses 3260 as default.
Returns a list of static discovery target(s) and related properties.
Adds a static discovery target by using <ip_addr> or <domain_name> and optionally <port_num>. If <port_num> is not specified, uses 3260 as the default. The the target iscsi name must be in IQN or EUI format.
Removes a static discovery target by using <ip_addr> or <domain_name> and optionally <port_num>. If <port_num> is not specified, uses 3260 as the default. The target iscsi name must be in IQN or EUI format.
Lists authentication method settings.
Sets iSCSI authentication properties. Sets level, authentication username and password. Supported <auth_method> is CHAP.
Level is one of [chapRequired | chapPreferred | chapDiscouraged | chapProhibited].
If --ip and --name are specified, authentication is set for per-target CHAP. If only --ip is
specified, authentication is set for per discovery address CHAP. If neither --ip nor --name
is specified, authentication is set for per adapter CHAP.
Resets target-level CHAP authentication properties to be inherited from the adapter level. Resetting adapter-level properties is not supported.
Sets iSCSI authentication properties (level, authentication
username and password) Specify CHAP as the value of <auth_method>.
Specify --mutual to indicate mutual CHAP.
Level is [chapRequired | chapPreferred | chapDiscouraged | chapProhibited] for simple CHAP and [chapRequired | chapProhibited] for mutual CHAP.
If --ip and --name are specified, authentication is set for per-target mutual CHAP. If only --ip is specified,
authentication is set for per discovery address mutual CHAP. If neither --ip nor --name is specified,
authentication is set for per-adapter mutual CHAP.
Resets target-level mutual CHAP authentication properties to be inherited from adapter level. Resetting adapter-level properties is not supported.
Lists PHBA properties.
Lists all target properties.
Lists LUN properties, including device name, bus number, LUN id, and size.
Lists LUN properties for the specified <target_id>. Run vicfg-iscsi --lun --list to
view the target ID.
Lists network properties, including IP, subnet mask, default gateway, etc.
Sets the HBA IPv4 address to <ip_addr>.
Sets the HBA network mask to <subnet_mask>.
Sets the HBA gateway to <default_gateway>.
Enables or disables ARP redirect.
Lists physical network portal properties, including mac address info, max and current transfer rate, and MTU size.
Sets MTU size to <mtu_size>.
Lists iSCSI initiator node properties, including iSCSI name and alias name.
Sets the iSCSI initiator node name to <iscsi_name> in IQN or EUI format.
Sets the iSCSI initiator node alias to <alias_name>.
Lists iSCSI parameters and their current value. If --ip and --name
are specified, the list is for per target parameters. If only --ip is specified,
the list is for per discovery address parameters. If neither --ip nor --name are
specified, the list is for adapter parameters. Specifying --detail lists detailed properties of iSCSI parameters.
Sets the specified iSCSI parameter to the specified value if the
parameter is settable. If --ip and --name are specified, sets per
target parameters. If only --ip is specified, sets per discovery address
parameters. If neither --ip nor --name is specified, sets adapter
parameters. Run --parameter --list --detail for information on whether a parameter
is settable or not. The following parameters are supported. See the vSphere
Command-Line Interface Installation and Scription Guide for more information.
dataDigestType HeaderDigest MaxOutstandingR2T FirstBurstLength MaxBurstLength MaxRecvDataSegLen NoopInterval NoopTimeout RecoveryTimeout DelayedAck
Resets target-level iSCSI parameters to be inherited from the adapter
level. Either --ip or --ip and --name are required to specify a target. Resetting
adapter-level parameters is not supported.
Lists software iSCSI information (enabled or not enabled).
Enables software iSCSI.
Disables software iSCSI.
Lists iSCSI adapter(s).
When you execute a vSphere CLI with the --server option pointing
to a vCenter Server system, you can use --vihost to specify the ESX/ESXi
host to run the command against.
The following examples assume you are specifying connection options, either
explicitly or, for example, by specifying the server, user name, and password.
Run vicfg-iscsi --help for a list of common options including connection options.
List discovery addresses and static targets (if configured) and related properties:
vicfg-iscsi <conn_options> --discovery --list <adapter_name>
Add a discovery address:
vicfg-iscsi <conn_options> --discovery --add --ip <ip_addr | domain_name> <adapter_name>
Remove a discovery address
vicfg-iscsi <conn_options> --discovery --remove --ip <ip_addr | domain_name> <adapter_name>
List static discovery targets and related properties:
vicfg-iscsi <conn_options> --static --list <adapter_name>
Add a static discovery target:
vicfg-iscsi <conn_options> --static --add --ip <ip_addr | domain_name> --name <iscsi_name> <adapter_name>
Remove a static discovery target:
vicfg-iscsi <conn_options> --static --remove --ip <ip_addr | domain_name> --name <iscsi_name> <adapter_name>
List authentication method settings:
vicfg-iscsi <conn_options> --authentication --list <adapter_name>
List adapter level mutual CHAP setting:
vicfg-iscsi <conn_options> --authentication --list -m CHAP -b <adapter_name>
List send target level CHAP setting:
vicfg-iscsi <conn_options> --authentication --list -m CHAP --ip <ip address> <adapter_name>
List static target level CHAP setting:
vicfg-iscsi <conn_options> --authentication --list -m CHAP --ip <ip address> --name <iqn name> <adapter_name>
Set authentication properties:
vicfg-iscsi <conn_options> --authentication --method <auth_method> --level <level> --auth_username <username> --auth_password <password> [--ip <ip_addr | domain_name> [--name <iscsi_name>] <adapter_name>
Reset target level CHAP authentication properties to be inherited from adapter level:
vicfg-iscsi <conn_options> --authentication --method <auth_method> --reset_auth --ip <ip_addr | domain_name> [--name <iscsi_name>] <adapter_name>
List PHBA properties:
vicfg-iscsi <conn_options> --phba --list <adapter_name>
List active targets properties:
vicfg-iscsi <conn_options> --target --list <adapter_name>
List LUNs properties:
vicfg-iscsi <conn_options> --lun --list <adapter_name>
List LUNs properties for target_id 0:
vicfg-iscsi <conn_options> --lun --list --target_id 0 <adapter_name>
List network properties:
vicfg-iscsi <conn_options> --network --list <adapter_name>
Set HBA IPv4 address:
vicfg-iscsi <conn_options> --network --ip <ip_addr> <adapter_name>
Set HBA network mask:
vicfg-iscsi <conn_options> --network --subnetmask <subnet_mask> <adapter_name>
Set HBA gateway:
vicfg-iscsi <conn_options> --network --gateway <default_gateway> <adapter_name>
Set HBA IPv4 address and network mask and gateway:
vicfg-iscsi <conn_options> --network --ip <ip_addr> --subnetmask <subnet_mask> --gateway <default_gateway> <adapter_name>
Enable or disable ARP redirect:
vicfg-iscsi <conn_options> --network --set ARP=true|false <adapter_name>
List PNP properties:
vicfg-iscsi <conn_options> --pnp --list <adapter_name>
Set MTU size:
vicfg-iscsi <conn_options> --pnp --mtu <mtu_size> <adapter_name>
List iSCSI initiator node properties:
vicfg-iscsi <conn_options> --iscsiname --list <adapter_name>
Set iSCSI node iqn name:
vicfg-iscsi <conn_options> --iscsiname --name <iscsi_name> <adapter_name>
Set iSCSI node alias:
vicfg-iscsi <conn_options> --iscsiname --alias <alias_name> <adapter_name>
List iSCSI parameters:
vicfg-iscsi <conn_options> --parameter --list <adapter_name>
List iSCSI parameters with details:
vicfg-iscsi <conn_options> --parameter --list --detail <adapter_name>
List iSCSI parameters with details at target level:
vicfg-iscsi <conn_options> --parameter --list --detail --ip <ip_addr | domain_name> <adapter_name>
Set adapter level iSCSI parameter:
vicfg-iscsi <conn_options> --parameter --set <name>=<value> <adapter_name>
Set target level iSCSI parameter:
vicfg-iscsi <conn_options> --parameter --set <name>=<value> --ip <ip_addr | domain_name> <adapter_name>
Reset target level iSCSI parameter to be inherited from the adapter level:
vicfg-iscsi <conn_options> --parameter --reset <name> --ip <ip_addr | domain_name> <adapter_name>
List software iSCSI enabled or not enabled:
vicfg-iscsi <conn_options> --swiscsi --list
Enable software iSCSI:
vicfg-iscsi <conn_options> --swiscsi --enable
Disable software iSCSI:
vicfg-iscsi <conn_options> --swiscsi --disable
List iSCSI adapter:
vicfg-iscsi <conn_options> --adapter --list