Share via


az stack-hci-vm network lnet

注意

此參考是 Azure CLI 的 stack-hci-vm 擴充功能的一部分(2.15.0 版或更高版本)。 擴充功能會在您第一次執行 az stack-hci-vm network lnet 命令時自動安裝。 深入了解擴充功能。

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

使用 stack-hci-vm 管理邏輯網路。

命令

名稱 Description 類型 狀態
az stack-hci-vm network lnet create

建立邏輯網路。

副檔名 實驗
az stack-hci-vm network lnet delete

刪除邏輯網路。

副檔名 實驗
az stack-hci-vm network lnet list

列出所有邏輯網路。

副檔名 實驗
az stack-hci-vm network lnet show

取得邏輯網路的詳細數據。

副檔名 實驗
az stack-hci-vm network lnet update

更新邏輯網路。

副檔名 實驗

az stack-hci-vm network lnet create

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立邏輯網路。

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]
                                    [--no-dns-servers {false, true}]
                                    [--no-gateway {false, true}]
                                    [--polling-interval]
                                    [--routes]
                                    [--subnets]
                                    [--tags]
                                    [--vlan]
                                    [--vm-switch-name]

範例

PutVirtualNetwork

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

必要參數

--custom-location

擴充位置的標識碼。

--name

邏輯網路的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--address-prefixes

AddressPrefixes - 子網的空間分隔地址前綴清單。 目前僅支援 1 個地址前綴。

使用方式:-address-prefixes “1.2.3.0/16”。

--dns-servers

DNS 伺服器 IP 位址的空間分隔清單。

使用方式:--dns-servers 10.220.32.16 10.220.32.17。

--gateway

閘道。

使用量:--gateway 1.2.3.4。

--ip-allocation-method

IPAllocationMethod - IP 位址配置方法。 可能的值包括:靜態、動態。

使用方式:--ip-allocation-method “Static/Dynamic”。

接受的值: Dynamic, Static
--ip-pool-end

IP 位址池的結尾。

使用量:--ip-pool-end “1.2.3.4”。

--ip-pool-start

IP 位址池的開頭。

使用量:--ip-pool-start “1.2.3.0”。

--ip-pool-type

Ip 集區類型。

使用量:--ip-pool-type “vm”。

--ip-pools

Ippools。

使用量:--ip-pools '[{/“start/”:/“1.2.3.0/”, /“end/”:/“1.2.3.4/”, /“ip_pool_type/”:/“vm/”}]'。

--location -l

如果未指定location,則會使用資源群組的位置。

--no-dns-servers

傳遞此旗標以略過傳遞 dns-servers 參數。

接受的值: false, true
--no-gateway

傳遞此旗標以略過傳遞閘道參數。

接受的值: false, true
--polling-interval

長時間執行作業的ARM輪詢間隔。

--routes

路由表中包含的路由集合。

使用方式:-routes '[{/“name/”:/“route1/”,/“properties/”:{/“address_prefix/”:/“1.2.3.0/28/”,/“next_hop_ip_address/”:/“1.2.3.1/”}},{/“name/” :/“route2/”,/“properties/”properties/“:{/”address_prefix/“:/”1.2.6.0/24/“,/”next_hop_ip_address/“:/”1.2.6.1/“}}]' 預期值:json-string/json-file/@json-file。

--subnets

子網 - 邏輯網路底下的子網清單。 如果提供此參數,則 cli 參數中的所有其他子網屬性都會被忽略。 預期值:json-string/@json-file。

使用方式:-子網 '[{“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

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--vlan

要用於子網的 Vlan。

使用方式:--vlan 10。

預設值: 0
--vm-switch-name

VM 交換器的名稱。

使用量:--vm-switch-name “vm-switch-01”。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az stack-hci-vm network lnet delete

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除邏輯網路。

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

範例

DeleteVirtualNetwork

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

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name

邏輯網路的名稱。

--polling-interval

長時間執行作業的ARM輪詢間隔。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az stack-hci-vm network lnet list

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出所有邏輯網路。

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

範例

ListVirtualNetworkByResourceGroup

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

ListVirtualNetworkBySubscription

az stack-hci-vm network lnet list

選擇性參數

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az stack-hci-vm network lnet show

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取得邏輯網路的詳細數據。

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

範例

GetVirtualNetwork

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

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name

邏輯網路的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az stack-hci-vm network lnet update

實驗

命令群組 『stack-hci-vm』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

更新邏輯網路。

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

範例

UpdateVirtualNetwork

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

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name

邏輯網路的名稱。

--polling-interval

長時間執行作業的ARM輪詢間隔。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。