Share via


az disk-pool iscsi-target

Note

This reference is part of the diskpool extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az disk-pool iscsi-target command. Learn more about extensions.

Manage iSCSI target with a Disk Pool.

Commands

Name Description Type Status
az disk-pool iscsi-target create

Create an iSCSI Target.

Extension GA
az disk-pool iscsi-target delete

Delete an iSCSI Target.

Extension GA
az disk-pool iscsi-target list

Get iSCSI Targets in a Disk pool.

Extension GA
az disk-pool iscsi-target show

Get an iSCSI Target.

Extension GA
az disk-pool iscsi-target update

Update an iSCSI Target.

Extension GA
az disk-pool iscsi-target wait

Place the CLI in a waiting state until a condition of the disk-pool iscsi-target is met.

Extension GA

az disk-pool iscsi-target create

Create an iSCSI Target.

az disk-pool iscsi-target create --acl-mode {Dynamic, Static}
                                 --disk-pool-name
                                 --iscsi-target-name --name
                                 --resource-group
                                 [--luns]
                                 [--managed-by]
                                 [--managed-by-extended]
                                 [--no-wait]
                                 [--static-acls]
                                 [--target-iqn]

Examples

Create or Update iSCSI Target

az disk-pool iscsi-target create --disk-pool-name "myDiskPool" --acl-mode "Dynamic" --luns name="lun0" managed-disk-azure-resource-id="/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_1" --target-iqn "iqn.2005-03.org.iscsi:server1" --name "myIscsiTarget" --resource-group "myResourceGroup"

Required Parameters

--acl-mode

Mode for Target connectivity.

Property Value
Accepted values: Dynamic, Static
--disk-pool-name

The name of the Disk Pool.

--iscsi-target-name --name -n

The name of the iSCSI Target.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--luns

List of LUNs to be exposed through iSCSI Target.

Usage: --luns name=XX managed-disk-azure-resource-id=XX

name: Required. User defined name for iSCSI LUN; example: "lun0" managed-disk-azure-resource-id: Required. Azure Resource ID of the Managed Disk.

Multiple actions can be specified by using more than one --luns argument.

--managed-by

Azure resource id. Indicates if this resource is managed by another Azure resource.

--managed-by-extended

List of Azure resource ids that manage this resource.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--static-acls

Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.

Usage: --static-acls initiator-iqn=XX mapped-luns=XX

initiator-iqn: Required. iSCSI initiator IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:client". mapped-luns: Required. List of LUN names mapped to the ACL.

Multiple actions can be specified by using more than one --static-acls argument.

--target-iqn

ISCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az disk-pool iscsi-target delete

Delete an iSCSI Target.

az disk-pool iscsi-target delete [--disk-pool-name]
                                 [--ids]
                                 [--iscsi-target-name --name]
                                 [--no-wait]
                                 [--resource-group]
                                 [--subscription]
                                 [--yes]

Examples

Delete iSCSI Target

az disk-pool iscsi-target delete --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--disk-pool-name

The name of the Disk Pool.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--iscsi-target-name --name -n

The name of the iSCSI Target.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az disk-pool iscsi-target list

Get iSCSI Targets in a Disk pool.

az disk-pool iscsi-target list --disk-pool-name
                               --resource-group

Examples

List Disk Pools by Resource Group

az disk-pool iscsi-target list --disk-pool-name "myDiskPool" --resource-group "myResourceGroup"

Required Parameters

--disk-pool-name

The name of the Disk Pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az disk-pool iscsi-target show

Get an iSCSI Target.

az disk-pool iscsi-target show [--disk-pool-name]
                               [--ids]
                               [--iscsi-target-name --name]
                               [--resource-group]
                               [--subscription]

Examples

Get iSCSI Target

az disk-pool iscsi-target show --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--disk-pool-name

The name of the Disk Pool.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--iscsi-target-name --name -n

The name of the iSCSI Target.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az disk-pool iscsi-target update

Update an iSCSI Target.

az disk-pool iscsi-target update [--disk-pool-name]
                                 [--ids]
                                 [--iscsi-target-name --name]
                                 [--luns]
                                 [--managed-by]
                                 [--managed-by-extended]
                                 [--no-wait]
                                 [--resource-group]
                                 [--static-acls]
                                 [--subscription]

Examples

Update iSCSI Target

az disk-pool iscsi-target update --disk-pool-name "myDiskPool" --name "myIscsiTarget" --luns name="lun0" managed-disk-azure-resource-id="/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm-name_DataDisk_1"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--disk-pool-name

The name of the Disk Pool.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--iscsi-target-name --name -n

The name of the iSCSI Target.

Property Value
Parameter group: Resource Id Arguments
--luns

List of LUNs to be exposed through iSCSI Target.

Usage: --luns name=XX managed-disk-azure-resource-id=XX

name: Required. User defined name for iSCSI LUN; example: "lun0" managed-disk-azure-resource-id: Required. Azure Resource ID of the Managed Disk.

Multiple actions can be specified by using more than one --luns argument.

--managed-by

Azure resource id. Indicates if this resource is managed by another Azure resource.

--managed-by-extended

List of Azure resource ids that manage this resource.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--static-acls

Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.

Usage: --static-acls initiator-iqn=XX mapped-luns=XX

initiator-iqn: Required. iSCSI initiator IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:client". mapped-luns: Required. List of LUN names mapped to the ACL.

Multiple actions can be specified by using more than one --static-acls argument.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az disk-pool iscsi-target wait

Place the CLI in a waiting state until a condition of the disk-pool iscsi-target is met.

az disk-pool iscsi-target wait [--created]
                               [--custom]
                               [--deleted]
                               [--disk-pool-name]
                               [--exists]
                               [--ids]
                               [--interval]
                               [--iscsi-target-name --name]
                               [--resource-group]
                               [--subscription]
                               [--timeout]
                               [--updated]

Examples

Pause executing next line of CLI script until the disk-pool iscsi-target is successfully created.

az disk-pool iscsi-target wait --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup" --created

Pause executing next line of CLI script until the disk-pool iscsi-target is successfully updated.

az disk-pool iscsi-target wait --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup" --updated

Pause executing next line of CLI script until the disk-pool iscsi-target is successfully deleted.

az disk-pool iscsi-target wait --disk-pool-name "myDiskPool" --name "myIscsiTarget" --resource-group "myResourceGroup" --deleted

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--disk-pool-name

The name of the Disk Pool.

Property Value
Parameter group: Resource Id Arguments
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--iscsi-target-name --name -n

The name of the iSCSI Target.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False