Share via


az stack-hci-vm network lnet

Note

This reference is part of the stack-hci-vm extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az stack-hci-vm network lnet command. Learn more about extensions.

Manage logicalnetworks with stack-hci-vm.

Commands

Name Description Type Status
az stack-hci-vm network lnet create

Create a logical network.

Extension GA
az stack-hci-vm network lnet delete

Delete a logical network.

Extension GA
az stack-hci-vm network lnet list

List all the logical networks.

Extension GA
az stack-hci-vm network lnet show

Get the details of a logical network.

Extension GA
az stack-hci-vm network lnet update

Update a logical network.

Extension GA

az stack-hci-vm network lnet create

Create a logical network.

az stack-hci-vm network lnet create --custom-location
                                    --name
                                    --resource-group
                                    [--address-prefixes]
                                    [--dns-servers]
                                    [--gateway]
                                    [--ip-allocation-method {Dynamic, Static}]
                                    [--ip-pool-end]
                                    [--ip-pool-start]
                                    [--ip-pool-type]
                                    [--ip-pools]
                                    [--location]
                                    [--network-security-group]
                                    [--no-dns-servers {false, true}]
                                    [--no-gateway {false, true}]
                                    [--polling-interval]
                                    [--routes]
                                    [--subnets]
                                    [--tags]
                                    [--vlan]
                                    [--vm-switch-name]

Examples

PutLogicalNetwork

az stack-hci-vm network lnet create --resource-group "test-rg" --custom-location "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location" --location "West US2" --name "test-lnet" --ip-allocation-method "Static" --address-prefixes "10.0.0.0/28" --ip-pool-start "10.0.0.0" --ip-pool-end "10.0.0.15" --vm-switch-name "test-vm-switch" --dns-servers 10.220.32.16 10.220.32.17

Required Parameters

--custom-location

The ID of the extended location.

--name

Name of the logical network.

--resource-group -g

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

Optional Parameters

--address-prefixes

AddressPrefixes - List of space-separated address prefixes for the subnet. Currently only 1 address prefix is supported.

Usage: --address-prefixes "1.2.3.0/16".

--dns-servers

Space-separated list of DNS server IP addresses.

Usage: --dns-servers 10.220.32.16 10.220.32.17.

--gateway

Gateway.

Usage: --gateway 1.2.3.4.

--ip-allocation-method

IPAllocationMethod - The IP address allocation method. Possible values include: Static, Dynamic.

Usage: --ip-allocation-method "Static/Dynamic".

Accepted values: Dynamic, Static
--ip-pool-end

End of the ip address pool.

Usage: --ip-pool-end "1.2.3.4".

--ip-pool-start

Start of the ip address pool.

Usage: --ip-pool-start "1.2.3.0".

--ip-pool-type

Ip pool type.

Usage: --ip-pool-type "vm".

--ip-pools

Ippools.

Usage: --ip-pools '[{"start":"1.2.3.0", "end":"1.2.3.4", "ip_pool_type":"vm"}]'.

--location -l

If location is not specified, the location of the resource group is used.

--network-security-group --nsg

Name or ID of a network security group (NSG).

Usage: --network-security-group "myNSG".

--no-dns-servers

Pass this flag in order to bypass passing the dns-servers parameter.

Accepted values: false, true
--no-gateway

Pass this flag in order to bypass passing the gateway parameter.

Accepted values: false, true
--polling-interval

ARM polling interval for long running operations.

--routes

Collection of routes contained within a route table.

Usage: --routes '[{"name":"route1","properties":{"address_prefix":"1.2.3.0/28","next_hop_ip_address":"1.2.3.1"}},{"name":"route2","properties":{"address_prefix":"1.2.6.0/24","next_hop_ip_address":"1.2.6.1"}}]' Expected value: json-string/json-file/@json-file.

--subnets

Subnet - list of subnets under the logical network. All other subnet properties in the cli parameters will be ignored if this is provided. Expected value: json-string/@json-file.

Usage: --subnets '[{"properties":{"addressPrefix":"1.2.3.0/24","ipAllocationMethod":"Static","ipPools":[{"end":"1.2.3.10","start":"1.2.3.0","ipPoolType":"vm"},{"end":"1.2.3.15","start":"1.2.3.11","ipPoolType":"vm"}]}}]'.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--vlan

Vlan to use for the subnet.

Usage: --vlan 10.

Default value: 0
--vm-switch-name

Name of the VM switch.

Usage: --vm-switch-name "vm-switch-01".

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az stack-hci-vm network lnet delete

Delete a logical network.

az stack-hci-vm network lnet delete [--ids]
                                    [--name]
                                    [--polling-interval]
                                    [--resource-group]
                                    [--subscription]
                                    [--yes]

Examples

DeleteLogicalNetwork

az stack-hci-vm network lnet delete --resource-group "test-rg" --name "test-lnet"

Optional Parameters

--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.

--name

Name of the logical network.

--polling-interval

ARM polling interval for long running operations.

--resource-group -g

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

--subscription

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

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az stack-hci-vm network lnet list

List all the logical networks.

az stack-hci-vm network lnet list [--resource-group]

Examples

ListLogicalNetworkByResourceGroup

az stack-hci-vm network lnet list --resource-group "test-rg"

ListLogicalNetworkBySubscription

az stack-hci-vm network lnet list

Optional Parameters

--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.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az stack-hci-vm network lnet show

Get the details of a logical network.

az stack-hci-vm network lnet show [--ids]
                                  [--name]
                                  [--resource-group]
                                  [--subscription]

Examples

GetLogicalNetwork

az stack-hci-vm network lnet show --resource-group "test-rg" --name "test-lnet"

Optional Parameters

--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.

--name

Name of the logical network.

--resource-group -g

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az stack-hci-vm network lnet update

Update a logical network.

az stack-hci-vm network lnet update [--ids]
                                    [--name]
                                    [--polling-interval]
                                    [--resource-group]
                                    [--subscription]
                                    [--tags]

Examples

UpdateLogicalNetwork

az stack-hci-vm network lnet update --resource-group "test-rg" --tags additionalProperties="sample" --name "test-lnet"

Optional Parameters

--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.

--name

Name of the logical network.

--polling-interval

ARM polling interval for long running operations.

--resource-group -g

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

--subscription

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

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.