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 --nsg]
[--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
The ID of the extended location.
Name of the logical network.
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.
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".
Space-separated list of DNS server IP addresses.
Usage: --dns-servers 10.220.32.16 10.220.32.17.
Gateway.
Usage: --gateway 1.2.3.4.
IPAllocationMethod - The IP address allocation method. Possible values include: Static, Dynamic.
Usage: --ip-allocation-method "Static/Dynamic".
Property | Value |
---|---|
Accepted values: | Dynamic, Static |
End of the ip address pool.
Usage: --ip-pool-end "1.2.3.4".
Start of the ip address pool.
Usage: --ip-pool-start "1.2.3.0".
Ip pool type.
Usage: --ip-pool-type "vm".
Ippools.
Usage: --ip-pools '[{"start":"1.2.3.0", "end":"1.2.3.4", "ip_pool_type":"vm"}]'.
If location is not specified, the location of the resource group is used.
Name or ID of a network security group (NSG).
Usage: --network-security-group "myNSG".
Pass this flag in order to bypass passing the dns-servers parameter.
Property | Value |
---|---|
Accepted values: | false, true |
Pass this flag in order to bypass passing the gateway parameter.
Property | Value |
---|---|
Accepted values: | false, true |
ARM polling interval for long running operations.
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.
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"}]}}]'.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Vlan to use for the subnet.
Usage: --vlan 10.
Property | Value |
---|---|
Default value: | 0 |
Name of the VM switch.
Usage: --vm-switch-name "vm-switch-01".
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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 |
Name of the logical network.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
ARM polling interval for long running operations.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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 |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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 |
Name of the logical network.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az stack-hci-vm network lnet update
Update a logical network.
az stack-hci-vm network lnet update [--add]
[--dns-servers]
[--force-string]
[--ids]
[--name]
[--network-security-group --nsg]
[--polling-interval]
[--remove]
[--resource-group]
[--set]
[--subscription]
[--tags]
Examples
UpdateLogicalNetwork
az stack-hci-vm network lnet update --name "test-lnet" --resource-group "test-rg" --network-security-group myNSG --tags additionalProperties="sample" az stack-hci-vm network lnet update --name "test-lnet" --resource-group "test-rg" --dns-servers "10.0.0.15"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Space-separated list of DNS server IP addresses.
Usage: --dns-servers 10.220.32.16 10.220.32.17.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | False |
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 |
Name of the logical network.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of a network security group (NSG).
Usage: --network-security-group "myNSG".
ARM polling interval for long running operations.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
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 |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |